lgmpds 发表于 2010-1-1 10:28:51

修改网页表单时,怎么触发相关事件脚本?

表单如下:
<input id="tomultiple" name="tomultiple" type="text" onbeforepaste='BeforePaste()' onKeyUp="this.value=this.value.replace(/[^0123456789]/g,'');calculatePrice()" onBlur="this.value=this.value.replace(/[^0123456789]/g,'');calculatePrice()" value="1">

用_IEFormElementSetValue($oText, "2")修改了输入框的值,但是却没有触发修改事件,没有调用calculatePrice()脚本进行相关计算。

请教解决方法。

sxd 发表于 2010-1-1 14:36:28

_IEFormElementSetValue ( ByRef $o_object, $s_newvalue [, $f_fireEvent = 1] )

第三个参数 默认是触发事件的

sxd 发表于 2010-1-1 14:38:24

实在不行就手动调用函数吧

_IENavigate ($oIE, 'javascript:calculatePrice())
页: [1]
查看完整版本: 修改网页表单时,怎么触发相关事件脚本?