为什么 ReferenceError: $ is not defined?
<script src="LAB.js"></script>
<script>
$LAB.script("jquery/jquery.js")
</script>
</body>
<p><?php echo mt_rand(89,161464) ?></p>
<script>
//Uncaught ReferenceError: $ is not defined
$(document).ready(function(){
console.log('reddy');
$("p").css('color','red');
})
</script>
但是工作:
window.onload=function(){
$("p").css('color','red');
}
2. item1.js
var interface={name:'interface'};
item2.js
interface.hu={name:'int'};
$LAB.script("item2.js").wait();
$LAB.script("item1.js");
//Uncaught ReferenceError: interface is not defined Help