亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

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

jQuery中,如何選擇一個具有多個類的標簽?類選擇器是對一個數組在進行操作嗎?

jQuery中,如何選擇一個具有多個類的標簽?類選擇器是對一個數組在進行操作嗎?

yangwwei 2016-04-21 09:09:27
<!DOCTYPE?html> <html> ????<head> ????????<title></title> ????????<script?src="http://libs.baidu.com/jquery/1.9.0/jquery.js"?type="text/javascript"></script> ????????<link?href="style.css"?rel="stylesheet"?type="text/css"?/> ????</head> ???? ????<body> ????????<div?class="red?green?blue">選擇這個標簽</div> ???????? ????????<script?type="text/javascript"> ??????????????? ????????</script> ????</body> </html>這份代碼中。。怎么選擇同時具有red green blue的div標簽?<!DOCTYPE?html> <html> ????<head> ????????<title>.class選擇器</title> ????????<script?src="http://libs.baidu.com/jquery/1.9.0/jquery.js"?type="text/javascript"></script> ????????<link?href="style.css"?rel="stylesheet"?type="text/css"?/> ????</head> ???? ????<body> ????????<div?class="red">立正,向我這邊看齊</div> ????????<div?class="red">哈嘍窩得</div> ????????<div?class="green">我先歇歇腳</div> ???????? ????????<script?type="text/javascript"> ????????????var?$redHTML?=?$(".red").html(); ????????????$(".green").html($redHTML); ????????</script> ????</body> </html>這份代碼中。。$redHTML的值為什么不是哈嘍窩得???
查看完整描述

3 回答

  • 3 回答
  • 0 關注
  • 5238 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號