JavaScript Tutorial-20

JavaScript Tutorial-20

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

Script:

  1. <html>
  2. <head>
  3. <title> Time JavaScript</title>
  4. </head>
  5. <body>
  6. Current Time Set
  7. <Script Language=”JavaScript”>
  8. currentDate=new Date()
  9. with (currentDate)
  10. write(“Time :” +getMinutes()+”.” +getSeconds()+”.” +getHours())
  11. </Script>
  12. </body>
  13. </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