<!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的值为什么不是哈喽窝得???
添加回答
举报
0/150
提交
取消