0
我試圖處理當輸入場失焦,但我不能讓下面的工作:無法處理jQuery的形式事件
jQuery("input").focusout(function() {
alert('yo');
});
注:
- 它不適用於任何形式的事件(
blur()
,change()
,focus()
等) - 它可以在
"input"
替換document
,但它不是我想要做的。 我使用WordPress的,所以我加入JavaScript代碼就像普通的方式,使:
function add_scripts() { wp_register_script('MyScript', 'script.js', array('jquery'), true); wp_enqueue_script('MyScript'); }
你有什麼錯誤嗎? –
你在$(function(){})中使用了這個嗎?在你的腳本文件? – Cruiser
@bhelmet不,控制檯清晰如水。 – PJoy