« पीछे | JS Script Introduction | आगे » |
---|
✯ वेबसाइट बनाने के लिए जिन 3 मुख्य प्रोग्रामिंग लैंग्वेज की आवश्यकता होती हैं उनमें से एक हैं जावा स्क्रिप्ट । जावा स्क्रिप्ट भी एचटीएमएल या सीएसएस की तरह क्लाइंट साइड स्क्रिप्टिंग लैंग्वेज हैं । यह लैंग्वेज यूजर के व्यवहार के अनुरूप कोड करके वेबसाइट में शामिल की जाती हैं जिसमें अनेक टास्क को एक साथ स्टोर किया जाता हैं ।
Java Script is one of the 3 main programming languages needed to build a website. Java Script is also a client side scripting language like HTML or CSS. This language is included in the website by coding according to the behavior of the user, in which many tasks are stored together.
✯ जावा स्क्रिप्ट को किसी वेबपेज में सम्मिलित करने के दो तरीके होते हैं जिनमें पहला आंतरिक (In-page/internal) जावास्क्रिप्ट तथा दूसरा तरीका बाह्य (External) जावास्क्रिप्ट होता हैं । जावास्क्रिप्ट के लिए एचटीएमएल का होना अति आवश्यक हैं बिना एचटीएमएल के जावा स्क्रिप्ट का कोई अस्तित्व नहीं होता हैं ।
There are two ways to include JavaScript in a webpage, the first is In-page/Internal JavaScript and the second is External JavaScript. It is very important for JavaScript to have HTML, without HTML there is no existence of Java Script.
✯ आंतरिक जावा स्क्रिप्ट किसी वेब पेज में दो तरीके से लिखी जा सकती है जिसके अंतर्गत स्क्रिप्ट को या तो हेड टैग में या फिर बॉडी टैग में लिख सकते हैं । वेब पेज के आंतरिक भाग में लिखी जाने वाली जावा स्क्रिप्ट हमेशा ‹script› ‹/script› टैग के मध्य लिखी जाती हैं जबकि बाह्य जावास्क्रिप्ट के लिए यह टैग नहीं लगाना पड़ता हैं । जावास्क्रिप्ट में फंक्शन को समाप्त करने के लिए फंक्शन के अंत में ; (सेमीकोलन) लगाया जाता हैं ।
Internal JavaScript can be written in a web page in two ways, under which the script can be written either in the head tag or in the body tag. JavaScript written inside the web page is always written between ‹script› ‹/script› tags, while external JavaScript does not have to put this tag. at the end of the function to end the function in JavaScript; (semicolon) is used.
✯ अभी आंतरिक जावास्क्रिप्ट को प्रयोग में लेते हुए एचटीएमएल पेज में जावास्क्रिप्ट की मदद से कुछ लिखने का प्रयास आरम्भ करते हैं ।
✯ document.write(); यह जावा स्क्रिप्ट का एक फंक्शन हैं जिसकी सहायता से एचटीएमएल डॉक्यूमेंट में बिना एचटीएमएल का कोई टैग प्रयोग में लिए कुछ लिख सकते हैं । इसके लिए हमें इस फंक्शन के कोष्टक के अंदर " " उद्धरण चिह्न (Quotation mark) डालकर उनके मध्य कुछ स्ट्रिंग लिखनी होती है जिसे हम एचटीएमएल डॉक्यूमेंट में प्रदर्शित करवाना चाहते हैं ।
document.write(); This is a function of Java Script, with the help of which you can write something in HTML document without using any HTML tag. For this, we have to put " " Quotation mark inside the brackets of this function and write some string between them which we want to display in the HTML document.