⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 inputhelper.js

📁 Jbuilder2006开发的严格按MVC设计模式组织开发过程
💻 JS
字号:
var uuidInput,captionInput;
function showInputHelper(frmName,frmWidth,url,uuidInputName,captionInputName){
  var frm=parent.window.document.getElementById(frmName);
  frm.src=url;
  var obj = parent.window.document.getElementById( "controlFv" );
  var str="";
  str=""+obj.cols;
  strtemp=str;
  var strs=str.split(",");
  str="";

  for(i=0;i<strs.length-1;i++){
    str=str+strs[i]+","
  }
  obj.cols=str+frmWidth;

  uuidInput=uuidInputName;
  captionInput=captionInputName;
}

function emptyInputHelper(frmName,frmWidth,url,uuidInputName,captionInputName){
  uuidInput=uuidInputName;
  captionInput=captionInputName;
  var  obj=document.all(uuidInput);
  obj.value="";
  obj=document.all(captionInput);
  obj.value="";
}

function cancelHelper(){
  var obj = parent.window.document.getElementById( "controlFv" );
  var str="";
  str=""+obj.cols;
  var strs=str.split(",");
  str="";
  for(i=0;i<strs.length-1;i++){
    str=str+strs[i]+","
  }
  obj.cols=str+"0";
}

function setValueToForm(frmName,uuid,caption){
  for(i=0;i<parent.frames.length;i++){
     if(parent.frames[i].name==frmName){
        var  obj=parent.frames[i].document.all(parent.frames[i].uuidInput);
        obj.value=uuid;
        obj=parent.frames[i].document.all(parent.frames[i].captionInput);
        obj.value=caption;
     }
  }

  var obj = parent.window.document.getElementById( "controlFv" );
  var str="";
  str=""+obj.cols;
  var strs=str.split(",");
  str="";
  for(i=0;i<strs.length-1;i++){
    str=str+strs[i]+","
  }
  obj.cols=str+"0";
}

function showHelper(frmName,frmWidth,url){
  var frm=parent.window.document.getElementById(frmName);
  frm.src="about:blank";
  frm.src=url;
  var obj = parent.window.document.getElementById( "controlFv" );
  var str="";
  str=""+obj.cols;
  strtemp=str;
  var strs=str.split(",");
  str="";

  for(i=0;i<strs.length-1;i++){
    str=str+strs[i]+","
  }
  obj.cols=str+frmWidth;
}
function showHelper2(frmName,frmWidth,argname,url,htmlInputName,alertMsg){
  var frm=parent.window.document.getElementById(frmName);
  frm.src="about:blank";
  if(document.getElementById(htmlInputName).value=="" &&  alertMsg!=""){
    alert(alertMsg);
    return false;
  }
  var url2=url+"&"+argname+"="+document.getElementById(htmlInputName).value;
  frm.src=url+"&"+argname+"="+document.getElementById(htmlInputName).value;
  var obj = parent.window.document.getElementById( "controlFv" );
  var str="";
  str=""+obj.cols;
  strtemp=str;
  var strs=str.split(",");
  str="";

  for(i=0;i<strs.length-1;i++){
    str=str+strs[i]+","
  }
  obj.cols=str+frmWidth;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -