<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 selectedindex
 var 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" }); }
);




創作者介紹
創作者 Ryan的blog 的頭像
Ryan

Ryan的blog

Ryan 發表在 痞客邦 留言(0) 人氣( 95 )