让onpage正常工作 [英] Get onpage to work correctly
问题描述
我试图让这个脚本在pageload上运行;我已经尝试过 .ready
和 .load
,我似乎无法使其工作。我在我的网站中也使用了<< body onLoad =document.emvForm.EMAIL_FIELD.focus()>
'。但是,这应该没有关系,对吗?
更新:在这个URL中,我仍然无法在页面加载,我做错了吗?
http://tinyurl.com/79azbav
解决方案
标识符为entertext的元素可能没有原生的准备好事件。
<您可能正想到:
$(document).ready(function(){
$ (#entertext)。shake();
});
用$ before (#entertext)。shake();
I'm trying to get this script to operate on pageload; I've tried .ready
and .load
and I still can't seem to get it working. I am using '<body onLoad="document.emvForm.EMAIL_FIELD.focus()">
' in my site as well. But that shouldn't matter, right?
Update: At this URL I have it still not working on page load, what am I doing wrong? http://tinyurl.com/79azbav
The element with the id "entertext" probably doesn't had a native "ready" event.
You're probably thinking of this:
$(document).ready(function() {
$("#entertext").shake();
});
With $ before ("#entertext").shake();
这篇关于让onpage正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!