以下jQuery示例应该将一些文本放入div中,但它没有。我尝试了Firefox、Google Chrome和Internet Explorer。
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" language="javascript"></script>
<script language="javascript">
$(window).load(function() {
$('adiv').html('<p>hello world</p>');
alert('done');
});
</script>
</head>
<body>
<div id="adiv">
</div>
</body>
</html>
抱歉,这可能很愚蠢,但我卡住了。