7e47ce238b
添加了管理后台所需的图片资源、Excel文件、安装程序以及设计相关的图片文件
67 lines
1.7 KiB
JavaScript
67 lines
1.7 KiB
JavaScript
//地址跳转
|
|
function go_url(_m){
|
|
var url="./"+_m+".htm";
|
|
window.location.href=url;
|
|
return true;
|
|
}
|
|
//输出表单html
|
|
function trans_html_input(obj_input){
|
|
var html="";
|
|
for(var i=0;i<obj_input.length;i++){
|
|
if(obj_input[i].type=="radio"){
|
|
html+='<div class="layui-form-item">'+obj_input[i].title+'</div>';
|
|
html+='<div class="layui-form-item">';
|
|
var arr_tmp=obj_input[i].op.split("|");
|
|
for(var j=0;j<arr_tmp.length;j++){
|
|
html+='<input type="radio" name="'+obj_input[i].name+'" value="'+arr_tmp[j]+'" title="'+arr_tmp[j]+'"';
|
|
if(arr_tmp[j]==obj_input[i].value)
|
|
html+=' checked';
|
|
html+='>';
|
|
}
|
|
html+='</div>';
|
|
}
|
|
}
|
|
return html;
|
|
}
|
|
function in_array(arr,v){
|
|
var r=-1;
|
|
for(var i=0;i<arr.length;i++){
|
|
if(arr[i]==v){
|
|
r=i;
|
|
break;
|
|
}
|
|
}
|
|
return r;
|
|
}
|
|
function get_url_param(name){
|
|
var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象
|
|
var r = window.location.search.substr(1).match(reg); //匹配目标参数
|
|
if (r!=null) return unescape(r[2]);
|
|
return null; //返回参数值
|
|
}
|
|
function o_window(url,winName,width,height){
|
|
xposition=0; yposition=0;
|
|
if ((parseInt(navigator.appVersion) >= 4 )){
|
|
xposition = (screen.width - width) / 2;
|
|
yposition = (screen.height - height) / 2;
|
|
}
|
|
theproperty= "width=" + width + ","
|
|
+ "height=" + height + ","
|
|
+ "location=0,"
|
|
+ "menubar=0,"
|
|
+ "resizable=1,"
|
|
+ "scrollbars=yes,"
|
|
+ "status=0,"
|
|
+ "titlebar=0,"
|
|
+ "toolbar=0,"
|
|
+ "hotkeys=0,"
|
|
+ "screenx=" + xposition + "," //仅适用于Netscape
|
|
+ "screeny=" + yposition + "," //仅适用于Netscape
|
|
+ "left=" + xposition + "," //IE
|
|
+ "top=" + yposition; //IE
|
|
window.open( url,winName,theproperty );
|
|
}
|
|
function deel_0(str,str1){
|
|
str=(str==0)?str1:str;
|
|
return str;
|
|
} |