第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

把radio的樣式改成自己的圖片,圖和class都沒有問題,jQuery有問題。

把radio的樣式改成自己的圖片,圖和class都沒有問題,jQuery有問題。

代碼如下<style>label{display:block;width:12px;height:12px;} .che{background:url('/public/Admin/images/h1.png') no-repeat;width:12px;height:12px;cursor: pointer;} .che:hover{background:url('/public/Admin/images/h2.png') no-repeat;width:12px;height:12px;cursor: pointer;} .selected{background:url('/public/Admin/images/h3.png') no-repeat;width:12px;height:12px;cursor: pointer;} .bgq{background-color:pink;width:20px;height:10px;}? ? ? ? </style><script> for (i in $('label')){ $('label')[i].onclick=function(e){ console.log($('label').length); for(j in $('label')){ $('label')[j].attr("class", "che"); } $(this).removeClass('che'); } } </script><form><tr id="typea">? ? ? ? ? ? ? ? ? ? <th>(1)</th>? ? ? ? ? ? ? ? ? ? <td><input type="radio" name="question1" value="1"/><label class="che" ></label></td>? ? ? ? ? ? ? ? ? ? <td><input type="radio" name="question1" value="2"/><label class="che" ></label></td>? ? ? ? ? ? ? ? ? ? <td><input type="radio" name="question1" value="3"/><label class="che" ></label></td>? ? ? ? ? ? ? ? ? ? <td><input type="radio" name="question1" value="4"/><label class="che" ></label></td> <td><input type="radio" name="question1" value="5"/><label class="che" ></label></td>? ? ? ? ? ? ? ? </tr> <tr id="typeb">? ? ? ? ? ? ? ? ? ? <th>(2)</th>? ? ? ? ? ? ? ? ? ? <td><input type="radio" name="question2" value="1"/><label class="che" )></label></td>? ? ? ? ? ? ? ? ? ? <td><input type="radio" name="question2" value="2"/><label class="che" ></label></td>? ? ? ? ? ? ? ? ? ? <td><input type="radio" name="question2" value="3"/><label class="che" ></label></td>? ? ? ? ? ? ? ? ? ? <td><input type="radio" name="question2" value="4"/><label class="che" ></label></td> ? ? <td><input type="radio" name="question2" value="5"/><label class="che" ></label></td>? ? ? ? ? ? ? ? </tr>請問jQuery的部分哪里錯了。
查看完整描述

3 回答

已采納
?
螞蟻Fly

TA貢獻11條經(jīng)驗 獲得超2個贊

Here,

<<? $('label')[j].attr("class", "che")? >>

//改為
$('label').eq(j).attr("class","che")

//你寫的這東西真亂啊

			


查看完整回答
反對 回復 2016-12-16
?
55開

TA貢獻18條經(jīng)驗 獲得超1個贊

for (i in $('label')) 這是什么意思

查看完整回答
反對 回復 2016-12-14
  • 螞蟻Fly
    螞蟻Fly
    遍歷;java叫迭代。。 百度是個好東西,同學
  • 3 回答
  • 0 關(guān)注
  • 2082 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學習伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號