I'm trying to alert the user when the value of a select changes to a specific one, but I have multiple select in my page (one for each user).
这是我尝试过的:http: //jsfiddle.net/mEFQq/
$(document).ready(function() {
$("select").change(function(){
if($(this).text() == "Chef")
{
alert();
}
});
});
我希望在选择更改为“Chef”值时发出警报。
我该怎么做呢?