Mezorro Graphics > Coding Center :: Code Database :: > Simple Codes

Simple Codes - Posted By Mezorro (admin) on 12th Feb 08 at 7:44am
Code:
 
  1. <script type="text/javascript">
  2. function disp_alert()
  3. {
  4. alert("I am an alert box!!");
  5. }
  6. </script>
 
Makes a popup window.


Code:
 
  1. <script type="text/javascript">
  2. document.write("Dancing is fun!");
  3. </script>
 

This would make the text "Dancing is fun!".


Code:
 
  1. <script type="text/javascript">
  2. docoument.write("Dancing is fun!")
  3. //Hello. You can put anything here.
  4. /* And this for
  5. Multiple lines.*/
  6. </script>
 


The // is a single line comment. You can put anything there on that line and it doesn't effect the code. The /* */ are multiple line comment. You can put anything there till the other */. Note remember that the star isi on the opposite side in the end.


Code:
 
  1. <a href="www.gowvshalo.com">
  2. This</a> Is a link to the my game website.