2013年5月2日 星期四

[JQuery] Using the jquery at the first time


[JQuery] Using the jquery at the first time



Create a html was called test.htm

Post following content to test.htm



 



 <html>


 <head>


 <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>


 <script type="text/javascript">


   $(document).ready(function() {


   $("a").click(function() {


     alert("Hello world!");


   });


 });


 </script>


 </head>


 <body>


    <a href="">Link</a>


 </body>


 </html>


 


Open the test.htm


Click Link will appear alarm message "Hello world".


 


Reference :



  1. Tutorials:Getting Started with jQuery


0 意見:

張貼留言