close

原文:

http://api.jquery.com/prop/#prop-propertyName-value

The .prop() method is a convenient way to set the value of properties—especially when setting multiple properties, using values returned by a function, or setting values on multiple elements at once. It should be used when setting selectedIndextagNamenodeNamenodeTypeownerDocumentdefaultChecked, or defaultSelected. Since jQuery 1.6, these properties can no longer be set with the .attr() method. They do not have corresponding attributes and are only properties.

反正現在應該沒什麼機會再去用jQuery 1.4以前的版本了吧

今天為了讓GridView標題上的CheckBox被勾選時, 就能把整個GridView的所有CheckBox全部勾選或清除, 又不想用c#, 所以想用jQuery在前端作

結果去網路上亂抄程式, 找到用Attr()的版本, 試不出來, 浪費了一個多小時

呿, 我要下班去吃燒臘飯了

 

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 花枝魚丸湯 的頭像
    花枝魚丸湯

    Dog's Life 2.0

    花枝魚丸湯 發表在 痞客邦 留言(0) 人氣()