<script type="text/javascript">
$("#default").html($("#divtest").html());
</script>
</body>
</html>
$("#default").html($("#divtest").html());
</script>
</body>
</html>
2016-03-25
<script type="text/javascript">
$(".red,.green,.blue").html("你们我全要了");
</script>
$(".red,.green,.blue").html("你们我全要了");
</script>
2016-03-25
document.getElementById("id").style.backgroundColor="red";
2016-03-25
<script type="text/javascript">
var $greenhtml=$(".green").html();
$(".red").html($greenhtml);
</script>
var $greenhtml=$(".green").html();
$(".red").html($greenhtml);
</script>
2016-03-25
$(document).ready(
function(){$("a").click(function(){
if($("a").html()=="更多"){
$("a").html("简化");
$(".ll").toggle();
}else {
$("a").text("更多");
$(".ll").toggle();
}
});
});
function(){$("a").click(function(){
if($("a").html()=="更多"){
$("a").html("简化");
$(".ll").toggle();
}else {
$("a").text("更多");
$(".ll").toggle();
}
});
});
其实 我感觉就会一个id的就可以 var name = $("#name").val(); 感觉这个用的多。跑题太远
2016-03-25
XMLHttpRequest cannot load http://www.imooc.com/data/fruit_part.html. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost' is therefore not allowed access.
谷歌浏览器,报错
谷歌浏览器,报错
2016-03-25