<script type="text/javascript">
$("#default").html($("#divtest").html());
</script>
$("#default").html($("#divtest").html());
</script>
2015-12-14
$(?).appendTo(?);第一个括号刚打完$,然后就等死...ubuntu12.04+谷歌浏览器.如果直接将$html复制过去就没事,百试不爽!这bug也是醉了!!!
2015-12-14
<script type="text/javascript">
var $content = "<b>唉,我又变胖了!</b>";
$("#html").html($content);
$("#text").text($content);
</script>
var $content = "<b>唉,我又变胖了!</b>";
$("#html").html($content);
$("#text").text($content);
</script>
2015-12-14
js用on。这是jq。直接写click啊
$(function () {
/*$("#btntest").bind("click",function () {
$(this).attr("disabled", "true");
}) */
$("#btntest").click(function(){
$(this).attr("disabled","true");
})
});
$(function () {
/*$("#btntest").bind("click",function () {
$(this).attr("disabled", "true");
}) */
$("#btntest").click(function(){
$(this).attr("disabled","true");
})
});
2015-12-13
$spn.text() == "隐藏" ? $spn.text("显示") : $spn.text("隐藏");
2015-12-13