我需要一个在页面加载之前触发一些 JavaScript 代码的函数。它与 document.ready 相反
有什么想法吗?
谢谢!
劳伦特
最佳答案
<html>
<head>
<script type="text/javascript">
//code here will run when encountered...
//to ensure jQuery not loaded you can do this:
if ( typeof jQuery == undefined ){
//jQuery be like not there.
}
</script>
<title>My Page</title>
</head>
<body>
</body>
</html>
关于javascript - 需要与 document.ready 相反的 jQuery,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20979586/