f.elements[i].setAttribute("onClick") = "alert('ss');";改为 f.elements[i].setAttribute("onclick") = "alert('ss');";
解决方案 »
- 求解
- ajax与服务器处理 返回的结果不一样
- 求帮助:关于输出图片的问题
- 跪求抓取图片能够移动图片的控件.
- 写代码时总是复制粘贴,来回切换视图很麻烦,找了方便的粘贴的小软件,与大伙共享
- 我用c#编写ASPX,A页面调用B页面时要传递参数,由于需求需要必须用POST方法传递,请大家帮忙!
- web配置出错。怎么解决呢?
- 【求助】HttpRuntime.Cache瞬间失效,Application_Start频繁调用的问题
- 动态添加表格的问题?
- **在属于不同工程的两个页面中传递参数,都有哪些方法呀?**
- (int)e.item.itemindex的值为什么是负数?
- 关于WEB.CONFIG请教指点如何包含其他配置文件
添加处理函数:
function func(o)
{
alert(o.tooltip);
}
===========
1。
这样可以迈??????2。
setAttribute 方法原型:Syntaxobject.setAttribute(sName, vValue [, iFlags])
ParameterssName Required. String that specifies the name of the attribute.
vValue Required. Variant that specifies the string, number, or Boolean to assign to the attribute.
iFlags Optional. Integer that specifies one the following flags: 0 When the attribute is set, it overwrites any attributes with the same name, regardless of their case.
1 Default. The case of the attribute that you set is respected when it is set on the object.
Return ValueNo return value.3。f.elements[i].setAttribute("onClick") = "alert('ss');";》》》// IE
f.elements[i].setAttribute("onclick", function() { "alert('ss');" } );// IE FF Opera
f.elements[i].onclick = function() { "alert('ss');" };