JavaScript Tutorial-18

JavaScript Tutorial-18

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

Script:

  1. <html>
  2. <head>
  3. <title>JavaScript</title>
  4. </head>
  5. <body>
  6. <Script Language=”JavaScript”>
  7. my_array_test= [0,1,2,3,4,5,6,7,8,9,10]
  8. write(“my_array_test: “+my_array_test+”<p>”)
  9. write(“my_array_test.join: ” +my_array_test.join(‘:’)+”<p>”)
  10. </Script>
  11. </body>
  12. </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 my_array_test= [0,1,2,3,4,5,6,7,8,9,10]
  • Line number 8 is a writedocument.write(“my_array_test: “+my_array_test+”<p>”)
  • Line number 9 is a write document.write(“my_array_test.join: ” +my_array_test.join(‘:’)+”<p>”)
  • Line number 10 is a closed JavaScript tag.
  • Line number 11 is a close body tag.
  • Line number 12 is a close html tag.

NEXT