不会开火的问题离开事件 [英] promblem that not going to fire leave event

查看:73
本文介绍了不会开火的问题离开事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在文本框的离开事件上调用Java脚本,但是我的离开事件不会触发.我需要怎么做才能触发事件?
请帮帮我.
谢谢.

I want to call the java script on leave event of textbox, but my leave event is not going to fire. What do I need to do to fire the event?
Please help me.
Thanks.

推荐答案

假设您正在使用"onblur"事件来调用javascript,

http://www.w3schools.com/jsref/event_onblur.asp



1.检查状态栏中是否有脚本错误,如果有,请检查在文本框的"onblur"事件上调用的脚本.

2.如果找不到任何脚本错误,请检查一些简单的脚本,以查看JavaScript是否正常工作,例如
Assuming you are using "onblur" event to call the javascript,

http://www.w3schools.com/jsref/event_onblur.asp



1. Check in the status bar if you are getting any script error, if so check the script you are calling on "onblur" event of textbox.

2. If you dont find any script error, check with something simple script to see if the javascript is working, for e.g.
onblur='javascript: alert("test");'

如果您收到警告消息,则表示浏览器和javascript正常运行.您需要调试在文本框的"onblur"事件上调用的脚本.

3.如果仍然找不到错误,请在onblur事件上发布您正在调用的脚本.

if you are receiving an alert message, that means the browser and javascript are working fine. You need to debug the script you are calling on "onblur" event of textbox.

3. If you still not able to find the error, post the script you are calling on the onblur event.


这篇关于不会开火的问题离开事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆