请问
-----------------------------------------------------------------------------
我这样写可以执行
<HTML>
<HEAD>
<TITLE>测试按钮事件</TITLE>
<SCRIPT LANGUAGE="VBScript">
<!--
Function ConvertTemp(a)
MsgBox a
End Function
-->
</SCRIPT>
</HEAD>
<BODY>
<INPUT NAME="Button1" TYPE="Button" VALUE="ConvertTemp()" onclick='ConvertTemp("aaaa")'/><br/>
</BODY>
</HTML>
------------------------------------------------------------------------
但是改成以下就不行了,为啥呢?
<HTML>
<HEAD>
<TITLE>测试按钮事件</TITLE>
<SCRIPT LANGUAGE="VBScript">
<!--
Function ConvertTemp(a,b)
MsgBox a&b
End Function
-->
</SCRIPT>
</HEAD>
<BODY>
<INPUT NAME="Button1" TYPE="Button" VALUE="ConvertTemp()" onclick='ConvertTemp("aaaa","bbbbbbbb")'/><br/>
</BODY>
</HTML>
------解决方案--------------------------------------------------------
<HTML>
<HEAD>
<TITLE>测试按钮事件</TITLE>
<SCRIPT LANGUAGE="VBScript">
<!--
Function ConvertTemp(a,b)
MsgBox a&b
End Function
-->
</SCRIPT>
</HEAD>
<BODY>
<INPUT NAME="Button1" TYPE="Button" VALUE="ConvertTemp()" onclick='call ConvertTemp("aaaa","bbbbbbbb")'/><br/>
</BODY>
</HTML>