Posted By

qrist0ph on 09/27/08


Tagged

ajax javascript jquery helloworld


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

vali29


JavaScript Hello Workd


 / Published in: HTML
 

  1. <head>
  2. <title>Titel der Webseite</title>
  3. <!-- Evtl. weitere Kopfinformationen -->
  4. <script type="text/javascript" src="jquery-1.3.2.min.js"></script>
  5. <script type="text/javascript">
  6. function doSomething(){
  7. alert(document.getElementById("foo").value);
  8. alert($("#foo").val());
  9. }
  10. </script>
  11. </head>
  12. <body onload="doSomething()">
  13.  
  14. Inhalt der Webseite
  15. <input type="text" id="foo" />
  16. <input type="button" name="Text 1" value="Text 1 anzeigen" onclick="doSomething()">
  17. </body>
  18. </html>

Report this snippet  

You need to login to post a comment.