JavaScript Tutorial-19

JavaScript Tutorial-19

আপনি আপনার ওয়েব সাইটকে ডাইনামিক করতে চাইলে আপনাকে অবশ্যই JavaScript ব্যাবহার করতে হবে। এখানে JavaScript  Tutorial এ Variable এর ব্যাবহার দেখানো হয়েছে।

Script:

  1. <html>
  2. <head>
  3. <title>JavaScript</title>
  4. </head>
  5. <body>
  6. <Script Language=”JavaScript”>
  7. students = new Array(5)
  8. students[0]= “rambo”
  9. students[1]= “jakson”
  10. students[2]= “rakib”
  11. students[3]= “rikni”
  12. students[4]= “rubni”
  13. write(students [0]+”<br>”)
  14. write(students [1]+”<br>”)
  15. write(students [2]+”<br>”)
  16. write(students [3]+”<br>”)
  17. write(students [4]+”<br>”)
  18. </Script>
  19. </body>
  20. </html>

Explain of Script:

  • Line number 1 is a start is a html tag.
  • Line number 2 is a start is a head tag.
  • Line number 3 is a title tag. This page title is “JavaScript”.
  • Line number 4 is a close head tag.
  • Line number 5 start body tag.
  • Line number 6 start JavaScript tag.
  • Line number 7 students = new Array(5), This is a five dimensional array.
  • Line number 8 students[0]= “rambo”, Array “0” is a Rambo.
  • Line number 9students[1]= “jakson”, Array “1” is a Jakson.
  • Line number 10students[2]= “rakib”, Array “2” is a rakib.
  • Line number 11students[3]= “rikni “, Array “3” is arikni.
  • Line number 12students[4]= “rubni “, Array “4” is arubni.
  • Line number 13 is a write document.write(students [0]+”<br>”)
  • Line number 14 is a write document.write(students [1]+”<br>”)
  • Line number 15 is a write document.write(students [2]+”<br>”)
  • Line number 16 is a write document.write(students [3]+”<br>”)
  • Line number 17 is a write document.write(students [4]+”<br>”)
  • Line number 18 is a closed JavaScript tag.
  • Line number 19 is a close body tag.
  • Line number 20 is a close html tag.

NEXT