ASP.NET正在根據控件的父控件名稱更改id,名稱值。這就是爲什麼我用JQUERY搜索id如下。沒有包裝jQuery搜索結果
// $ is looking to the end of "id" attribute of input elements
$("input[id$='cbAddToNews']")
只有一個元素由jQuery返回。但是,當我想改變的屬性,我使用這個語法:
$($("input[id$='cbAddToNews']")[0]).show()
有沒有辦法做到這一點不與$(...[0])
包裝呢?