1.fireEvent执行事件
2.attachEvent绑定事件
3.cancelBubble是不一样的:If the event being fired cannot be cancelled, fireEvent always returns true.
Regardless of their values specified in the event object, the values of the four event properties—cancelBubble, returnValue, srcElement, and type—are automatically initialized to the values shown in the following table.
------------------------------
Event object| property Value
------------|-----------------
cancelBubble| false
---------------------------
returnValue |true
------------|---------------
srcElement |element on which the event is fired
------------|----------------------------------
type name of| the event that is fired
------------------------------------------------------
2.attachEvent绑定事件
3.cancelBubble是不一样的:If the event being fired cannot be cancelled, fireEvent always returns true.
Regardless of their values specified in the event object, the values of the four event properties—cancelBubble, returnValue, srcElement, and type—are automatically initialized to the values shown in the following table.
------------------------------
Event object| property Value
------------|-----------------
cancelBubble| false
---------------------------
returnValue |true
------------|---------------
srcElement |element on which the event is fired
------------|----------------------------------
type name of| the event that is fired
------------------------------------------------------
解决方案 »
- 删除数组对象中的某个对象
- 怎么样实现先隐藏table,然后点击按钮后,显示按钮,display属性等于什么值时是显示的意思。在线等
- 树形菜单 鼠标经过用层显示下级菜单 就是阿里巴巴的那种菜单
- createElement建立的radio不能被选择 怎么回事 只有20分了
- 表格的行数问题
- 更新页面,数据从数据库中读出来,有个问题,原来新增时,一组单选项,每个都有个onclick事件,可读出数据后如何对应这个onclick啊?
- 关于非法下载的问题
- 谁能给出答案,100拿走,在经过下拉菜单的选项时,选项背景变为深蓝(反色),如何才能改变这种效果呢?
- 谁有带checkbox的树型目录?
- javascript 究竟能做些什么?
- 以上代码怎么用,能否给个例子
- 请问:如何设置<input type="file">的默认浏览路径? 谢谢!
document.all.a.fireEvent("onclick")
document.all.a.click()
两个效果一样, 有区别么?