<input type="text" id="txt" class="t" />
對上面控制項,使用Jquery選擇器
$("input:text") 用input的type尋找
$("#txt") 用id尋找
$(".t") 用class尋找
//判斷是否有輸入值
if($('input:text').is(":empty"))
{
alert('請輸入資料!');
}
<select class="DDLStopCode>
<option selected="selected" value="0"> Please Select </option>
<option value="A">A</option>
<option value="B">B</option>
</select>//input select selectedindexvar index = $('.DDLStopCodeInsert option:selected').index();
//table
// tr light change $(".GvStop tr:not(:has(th))").hover( function () { $(this).css({ "background-color": "#87cefa" }); }, function () { $(this).css({ "background-color": "white" }); });
請先 登入 以發表留言。