attachEvent
为注册事件,onreadystatechange
表示状态完成,动作发生
为注册事件,onreadystatechange
表示状态完成,动作发生
解决方案 »
- 关于JS和浏览器的问题
- createTextRange在Firefox,Chrome等非IE浏览器的兼容问题
- 就剩这1百分了,问个问题:Firefox中怎么用javasrcipt实现后退?具体情况见下面详细说明~
- 未定义变量的问题
- 为什么这个判断不成立它还是会执行??
- 把昨天crying_boy老师的范例进行了更改,发出来供大家参考,指正!
- 求一正则表达式?
- 请问谁有XMLSelTree的源代码,我急用,可以的话发到我邮箱 [email protected] 暂给100分
- 哎。问js的大堆初级问题...............真是要死了。。。。waiting...
- 如何正确用XMLHttpRequest读取一个同目录的文件
- 谁做过类似树形论坛的列表?
- td中放置图片,怎样写个javascript代码,使图片自适应td的高度和宽度呢?
onreadystatechange是事件,orsc是方法,意思是说当触发onreadystatechange事件的时候调用orsc方法。(问题二同)
onreadystatechange是当属性改变时触发的事件。
onerror是产生错误的时候,触发的事件。
觉得你最好找个资料好好看看。
将事件和方法绑定onreadystatechange
属性值发生更改,则调用该方法。
FF下用addEventListener和removeEventListener
而且事件名称不要加on附一段IE下绑定事件和移除事件的资料,建议下载“网页制作完全手册”里面这些函数的资料都有,不过只是针对IE的……
attachEvent Method Internet Development Index --------------------------------------------------------------------------------Binds the specified function to an event, so that the function gets called whenever the event fires on the object.SyntaxbSuccess = object.attachEvent(sEvent, fpNotify)
ParameterssEvent Required. String that specifies any of the standard DHTML Events.
fpNotify Required. Pointer that specifies the function to call when sEvent fires. Return ValueBoolean. Returns one of the following possible values:true The function was bound successfully to the event.
false The function was not bound to the event. detachEvent Method Internet Development Index --------------------------------------------------------------------------------Unbinds the specified function from the event, so that the function stops receiving notifications when the event fires.Syntaxobject.detachEvent(sEvent, fpNotify)
ParameterssEvent Required. String that specifies any of the standard DHTML Events.
fpNotify Required. Pointer that specifies the function previously set using the attachEvent method. Return ValueNo return value.