给页面对象加上onkeyup事件怎么加呀 document.getElementById(txtFind).onkeyup=hello 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 我就是这么写的,不管用呀,hello()是拼起来的字符串 不能光写hello,我里面有好多参数的呀 mingxuan3000(铭轩) ( ) 信誉:100 ----------------帮帮忙吧,不加参数可以。我里面有参数,怎么实现呀,很着急呀 <input type="text" id="aaa" value="2"><SCRIPT LANGUAGE="JavaScript">var txtFind="aaa" var cc="123"document.getElementById(txtFind).onclick=new Function ( "hello("+cc+")")function hello(a){ alert(a)}</SCRIPT> 噢,我写成string funStr="\"hello()\""document.getElementById(txtFind).onclick=new Function(funStr);了,多加了个转义符,谢谢了 <input type="text" name="danjia" onkeyup="setdanjia(this.value)"> 大家帮忙看下我这段javascript代码有啥问题。 uploadify swf vs内置iis正常显示 发布在iis7上无法显示 js获取不了中间层 学javascript 蛋疼的IE9不支持js里面的object.style.display类的属性吗??????? 中断打印 js中关于new ActiveXObject button的onclick事件 求一个时间控件(急需,在线等!) 关于form中元素的问题 在线等:onKeyUp=document.form1.text1.value=document.form1.text2.value+this.value csdn?新版:垃圾版
----------------
帮帮忙吧,不加参数可以。
我里面有参数,怎么实现呀,很着急呀
<SCRIPT LANGUAGE="JavaScript">var txtFind="aaa"
var cc="123"
document.getElementById(txtFind).onclick=new Function ( "hello("+cc+")")
function hello(a){
alert(a)
}
</SCRIPT>
document.getElementById(txtFind).onclick=new Function(funStr);了,
多加了个转义符,
谢谢了