请问$("#my_id")写在body里和body后有区别或者有要求吗?
1
<html>
<head>
<title></title>
</head>
<body>
<div id="divtest">div的内容</div>
<div id="default"></div>
<script type="text/javascript">
$("#default").html($("#divtest").html());
</script>
</body>
</html>
2
<html>
<head>
<title></title>
</head>
<body>
<div id="divtest">div的内容</div>
<div id="default"></div>
</body>
<script type="text/javascript">
$("#default").html($("#divtest").html());
</script>
</html>