温馨提示:代码在线浏览功能只能做为源码浏览参考,如果想更进一步了解该代码请下载:热线球队财务管理系统源码
当前文件:
SmallFinance/script/function.js[2K,2009-6-12 11:54:23],打开代码结构图
SmallFinance/script/function.js[2K,2009-6-12 11:54:23],打开代码结构图1// JavaScript Document 2
function DecimalInput() 3
{ 4
var keys="45, 48,49,50,51,52,53,54,55,56,57"; 5
6
if(keys.indexOf(window.event.keyCode)==-1) 7
{ 8
window.event.keyCode = 0; 9
} 10
} 11
12
function trimStr(strValue) 13
{ 14
strValue = String(strValue) ; 15
strValue = strValue.replace(/^ +/,""); 16
strValue = strValue.replace(/ +$/,""); 17
return strValue ; 18
} 19
20
function parseFloatNumber(float) 21
{ 22
if(trimStr(float)=="") 23
return 0; 24
25
float = float.replace(/,/g,""); 26
return parseFloat(float); 27
} 28
29
function $(_sId) 30
{ 31
return document.getElementById(_sId); 32
} 33
function $$(_sName) 34
{ 35
return document.getElementsByName(_sName); 36
} 37
38
function AddButtonAction(action, postdata) 39
{ 40
var _cfg = {name: "data", cgi: action, value: postdata}; 41
var sFormName = "_form_" + _cfg["name"] + "_"; 42
var sFrameName = "_frame_" + _cfg["name"] + "_"; 43
var oFormName = $(sFormName); 44
var oFrameName = $(sFrameName); 45
if(oFormName != null) { 46
oFormName.removeNode(true); 47
} 48
if(oFrameName != null) { 49
oFrameName.removeNode(true); 50
} 51
if(window.Event) { 52
var oFrame = document.createElement("iframe"); 53
oFrame.name = sFrameName; 54
} 55
else { 56
var oFrame = document.createElement("<iframe name='" + sFrameName + "'></iframe>"); 57
} 58
oFrame.id = sFrameName; 59
oFrame.style.display = "none"; 60
var oForm = document.createElement("form"); 61
oForm.id = sFormName; 62
oForm.name = sFormName; 63
oForm.action = _cfg["cgi"]; 64
oForm.method = "post"; 65
oForm.style.display = "none"; 66
oForm.target = sFrameName; 67
68
oInput = document.createElement("input"); 69
//oInput.type = "hidden"; 70
oInput.value = _cfg["value"]; 71
oInput.name = "post_data[]"; 72
oForm.appendChild(oInput); 73
74
document.body.appendChild(oForm); 75
document.body.appendChild(oFrame); 76
oForm.submit(); 77
} 78
79
function showWindowDialog() 80
{ 81
var szRef = "member_query.aspx"; 82
var szFeatures = "help=no;status=no;dialogWidth=800px;dialogHeight=450px;scroll=no;"; 83
84
var wndReturn = showModalDialog(szRef,"",szFeatures); 85
//var wndReturn = window.open(szRef,"query",szFeatures); 86
return String(wndReturn); 87
}






}
}