-1

わかりました、私は困惑しています。jqueryが機能するページがありますが、何らかの理由で機能しません。

<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
</head>
<body>
</body>
<script>
jQuery(function($) { alert() })(jQuery);
</script>
</html>

jqueryに使用しているリンクだと思いますが、ready関数が起動せず、理由がわかりません。

4

4 に答える 4

0

これは :

jQuery(document).ready(function()
                       {
                          alert('alert');
                       });
于 2013-01-31T06:28:44.753 に答える
0

この方法を試してください

<script>
$(document).ready(function(){
  alert('foo')
});
//OR
$(function() { 
   alert('foo'); 
});


</script>
于 2013-01-31T06:25:53.100 に答える
-1
$( function() { alert("blah!!"); });

また

jQuery( function() { alert("blah!"); });

また

$(document).ready( function() { });

また

$(window).load( function() { });

また

jQuery(window).load( function() { });

また

jQuery(document).ready( function() { });

何千ものオプションがあなたのためにあります!

于 2013-01-31T06:25:29.140 に答える
-1

これを試してみてください!

<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
</head>
<body>
</body>
<script type="text/javascript">
    $(function () {
        alert("test");
    });
</script>
</html>
于 2013-01-31T06:27:05.153 に答える