মাল্টি লাইন মন্তব্য – জাভাস্ক্রিপ্ট (পর্ব-১১)

সাধারণত প্রোগ্রামের শুরুতে অথবা কোন ফাংশনের শুরুতে সে সম্পর্কিত বিস্তারিত তথ্য উপস্থাপনের প্রয়োজন হয়, আর এ ক্ষেত্রে মাল্টি লাইন মন্তব্য ব্যবহার করা হয়। এজন্য মন্তব্য এর শুরু নির্দেশ করার জন্য /* স্লাস এবং স্টার চিহ্ন এর পর মন্তব্য এবং শেষে  স্টার চিহ্ন এবং স্লাস */ ব্যবহার করা হয়। অর্থাৎ /* This is an example of multi line comment. This is the second line of this comment.*/ এর অনুরূপ মাল্টি লাইন মন্তব্য যুক্ত করা হয়।

জাভাস্ক্রিপ্টে লেখা মন্তব্য যুক্ত একটি প্রোগ্রাম

[sourcecode language=”js”]
<html>
<head>
<title> www.tutrialbd.com </title>
<style>
body{background: #FFC;
font-size:24px;}
</style>
</head>
<body>
<script type = "text/javascript">
/* When the page will load it show "Good morning" in a alart box . The page will show It is morning.You should learn JavaScript now.Visit www.tutorialbd.com and start to learn JavaScript.*/
alert("Good morning");
document.write("It is morning.")
document.write("You should learn JavaScript now.")
document.write("Visit www.tutorialbd.com and start to learn JavaScript.")
</script>
</body>
</html>

[/sourcecode]

একটা নোটপ্যাড open করে উপরের code টুকু লিখে file মেনু থেকে Save as এ ক্লিক করে File name: index.html , Save as type : All files, দিয়ে save করে index.html ফাইলটি Mozilla Firefox দিয়ে open করলে নিচে প্রদর্শিত ছবির মত দেখাবে।




উপরের প্রোগ্রামটিতে /*   */ এর পরে লেখা When the page will load  it show "Good morning" in a alart box . The page will show It is morning.You should learn JavaScript now.Visit www.tutorialbd.com and start to learn JavaScript.ব্রাউজারে প্রদর্শিত হচ্ছে না। করণ এটা একটা মাল্টি লাইন মন্তব্য।

জাভাস্ক্রিপ্টের অন্যান্য টিউটোরিয়াল সমূহ :

Leave a Comment