【转】Javascript调用VBscript函数的例子
<html>
<head>
</head>
<body>
<script language=vbscript>
function VBTrimStr(temStr)
VBTrimStr=trim(temStr)
end function
</script>
<script language=javascript>
function TrimStr(temStr){
return VBTrimStr(temStr)
}
</script>
<form name=fmTest>
<input type=text name=txtTest>
<input type=button name=btnOk value=ok>
</form>
<script language=javascript for=btnOk event=onclick>
var getStr=document.fmTest.txtTest.value
alert("*" + getStr + "*")
getStr=TrimStr(getStr)
alert("*" + getStr + "*")
</script>
</body>
</html>本贴子以“现状”提供且没有任何担保,同时也没有授予任何权利
This posting is provided "AS IS" with no warranties, and confers no rights.
This posting is provided "AS IS" with no warranties, and confers no rights.



浙公网安备 33010602011771号