JavaScript Tutorial-16

JavaScript Tutorial-16

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

JavaScript Tutorial

Script:

  1. <html>
  2. <head>
  3. <title>JavaScript</title>
  4. </head>
  5. <body>
  6. <Script Language=”JavaScript”>
  7. var m=15;
  8. var n=10;
  9. var o=20;
  10. var p=25;
  11. var q=30;
  12. m -= 5
  13. n *= 4
  14. o /= 3
  15. p %= 5
  16. q += 7
  17. write(m);
  18. write(“<br>”);
  19. write(n);
  20. write(“<br>”);
  21. write(o);
  22. write(“<br>”);
  23. write(p);
  24. write(“<br>”)
  25. write(q);
  26. </Script>
  27. </body>
  28. </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 var m=15;
  • Line number 8var n=10;
  • Line number 9var o=20;
  • Line number 10var p=25;
  • Line number 11var q=30;
  • Line number12 is m -=5
  • Line number 13 is n*=4
  • Line number 14 is  o/=3
  • Line number 15 isp %=5
  • Line number 16 is q += 7
  • Line number 17 is a write(m).
  • Line number 18 used <br> tag. This tag is a line break.
  • Line number 19 is a write (n).
  • Line number 20 used <br> tag. This tag is a line break.
  • Line number 21 is a write (o).
  • Line number 22 used <br> tag. This tag is a line break.
  • Line number 23 is a write (p).
  • Line number 24 used <br> tag. This tag is a line break.
  • Line number 25 is a write (q).
  • Line number 26 is a closed JavaScript tag.
  • Line number 27 is a close body tag.
  • Line number 28 is a close html tag.

NEXT