jQuery.change()事件未被触发

jQuery .change() event is not being triggered?

本文关键字:事件 change jQuery      更新时间:2023-09-26

示例位于http://jsfiddle.net/4RAPH/或参见以下内容:

<select class="businessTypePullDown">
    <option value="" disabled selected>Business Type</option>
    <option value="1">General</option>
    <option value="2">Lawyer</option>
    <option value="3">Software Development</option>
    <option value="4">Auto-repair</option>
</select>
function filterPullDown () {
    alert('hello');
}
$("businessTypePullDown").change(filterPullDown);

只是一个拼写错误,您漏掉了一个点:

 $(".businessTypePullDown")

你的小提琴更新了:http://jsfiddle.net/4RAPH/1/