-
JavaScript में document.forms का उपयोग कैसे करें?
अवलोकनdocument.forms प्रॉपर्टी दस्तावेज़ में सभी <form> तत्वों का संग्रह लौटाती है।उदाहरण<!DOCTYPE html> <html> <head> <title>JavaScript Example</title> </head> <body> <
-
JavaScript में 1 और 200 के बीच रैंडम नंबर कैसे प्राप्त करें?
अवलोकन1 से 200 के बीच रैंडम पूर्णांक प्राप्त करने के लिए Math.random() और Math.floor() का उपयोग करें और 1 जोड़ें।उदाहरण<!DOCTYPE html> <html> <body> <script> document.write(Math.floor(Math.random() * 200) + 1
-
JavaScript में वेब पेज का प्रोटोकॉल (http या https) कैसे प्राप्त करें?
अवलोकनwindow.location.protocol प्रॉपर्टी वर्तमान पेज का प्रोटोकॉल (http: या https:) लौटाती है।उदाहरण<!DOCTYPE html> <html> <body> <script> document.write("https or https: <br>The protocol is:"
-
JavaScript में window.screen ऑब्जेक्ट की प्रॉपर्टीज़ क्या हैं?
अवलोकनwindow.screen ऑब्जेक्ट उपयोगकर्ता की स्क्रीन के बारे में जानकारी प्रदान करता है। मुख्य प्रॉपर्टीज़:screen.width - स्क्रीन की चौड़ाईscreen.height - स्क्रीन की ऊंचाईscreen.availWidth - टास्कबार आदि को छोड़कर उपलब्ध चौड़ाईscreen.availHeight - टास्कबार आदि को छोड़कर उपलब्ध ऊंचाईउदाहरण<!DOCTYPE
-
JavaScript में document.images का उपयोग कैसे करें?
अवलोकनdocument.images प्रॉपर्टी दस्तावेज़ में सभी <img> तत्वों का संग्रह लौटाती है।उदाहरण<!DOCTYPE html> <html> <head> <title>JavaScript Example</title> </head> <body> <
-
JavaScript में document.links का उपयोग कैसे करें?
अवलोकनdocument.links प्रॉपर्टी दस्तावेज़ में सभी लिंक्स (<a> और <area> जिनमें href हो) का संग्रह लौटाती है।उदाहरण<!DOCTYPE html> <html> <head> <title>JavaScript Example</title> </head> <bod
-
JavaScript में स्क्रीन की कलर डेप्थ कैसे प्राप्त करें?
अवलोकनscreen.colorDepth प्रॉपर्टी स्क्रीन पर रंग प्रदर्शित करने के लिए उपयोग किए जाने वाले बिट्स की संख्या लौटाती है।उदाहरण<!DOCTYPE html> <html> <body> <script> document.write("Screen width: " + sc
-
JavaScript में स्क्रीन की पिक्सल डेप्थ कैसे प्राप्त करें?
अवलोकनscreen.pixelDepth प्रॉपर्टी स्क्रीन की रंग गहराई (बिट्स प्रति पिक्सल) लौटाती है।उदाहरण<!DOCTYPE html> <html> <body> <script> document.write("Screen width: " + screen.width); &nbs
-
JavaScript में scrollY प्रॉपर्टी की भूमिका क्या है?
अवलोकनscrollY प्रॉपर्टी दस्तावेज़ के लंबवत स्क्रॉल पिक्सल को लौटाती है, यह pageYOffset के समान है।उदाहरण<!DOCTYPE html> <html> <head> <style> div { background-color:
-
JavaScript में scrollX प्रॉपर्टी की भूमिका क्या है?
अवलोकनscrollX प्रॉपर्टी दस्तावेज़ के क्षैतिज स्क्रॉल पिक्सल को लौटाती है, यह pageXOffset के समान है।उदाहरण<!DOCTYPE html> <html> <head> <style> div { background-color
-
JavaScript बिटवाइज XOR (^) ऑपरेटर क्या है?
अवलोकनबिटवाइज XOR (^) ऑपरेटर में यदि दोनों बिट अलग-अलग हैं, तो परिणाम 1 होता है।उदाहरण<!DOCTYPE html> <html> <body> <script> document.write("Bitwise XOR Operator<br>"); &n
-
JavaScript बिटवाइज राइट शिफ्ट (>>) ऑपरेटर क्या है?
अवलोकनबिटवाइज राइट शिफ्ट ऑपरेटर बिट्स को दाईं ओर शिफ्ट करता है, साइन बिट को बनाए रखता है।उदाहरण<!DOCTYPE html> <html> <body> <script> document.write("Bitwise Right Shift Operator<br>");
-
JavaScript में document.body का उपयोग कैसे करें?
अवलोकनdocument.body प्रॉपर्टी दस्तावेज़ के <body> तत्व को संदर्भित करती है। आप इसकी स्टाइल बदल सकते हैं।उदाहरण<!DOCTYPE html> <html> <head> <title>JavaScript Example</title> </head> <body> &nb
-
JavaScript में document.embeds का उपयोग कैसे करें?
अवलोकनdocument.embeds प्रॉपर्टी दस्तावेज़ में <embed> टैग्स की संख्या लौटाती है।उदाहरण<!DOCTYPE html> <html> <head> <title>JavaScript Example</title> </head> <body> <em
-
JavaScript बिटवाइज लेफ्ट शिफ्ट (<<) ऑपरेटर क्या है?
अवलोकनबिटवाइज लेफ्ट शिफ्ट ऑपरेटर बिट्स को बाईं ओर शिफ्ट करता है और दाईं ओर शून्य भरता है।उदाहरण<!DOCTYPE html> <html> <body> <script> document.write("Bitwise Left Shift Operator<br>");
-
JavaScript में डेसीमल को बाइनरी में कैसे बदलें?
अवलोकनडेसीमल संख्या को बाइनरी स्ट्रिंग में बदलने के लिए toString(2) मेथड का उपयोग करें।उदाहरण<!DOCTYPE html> <html> <body> <script> document.write("Decimal to Binary<br>");  
-
JavaScript में document.documentElement का उपयोग कैसे करें?
अवलोकनdocument.documentElement प्रॉपर्टी दस्तावेज़ के रूट एलिमेंट (आमतौर पर <html>) को लौटाती है।उदाहरण<!DOCTYPE html> <html> <head> <title>JavaScript Example</title> </head> <body> <p>Demo Text</p> <script> document.body.style.backgr
-
JavaScript में बाइनरी को डेसीमल में कैसे बदलें?
अवलोकनबाइनरी संख्या को डेसीमल में बदलने के लिए parseInt() फ़ंक्शन का उपयोग करें जिसका आधार 2 हो।उदाहरण<!DOCTYPE html> <html> <body> <script> var binary = "1010"; va
-
JavaScript में 0 और 199 के बीच रैंडम नंबर कैसे प्राप्त करें?
अवलोकन0 से 199 के बीच रैंडम पूर्णांक प्राप्त करने के लिए Math.random() और Math.floor() का उपयोग करें।उदाहरण<!DOCTYPE html> <html> <body> <script> document.write(Math.floor(Math.random() * 200));
-
JavaScript में document.head का उपयोग कैसे करें?
अवलोकनdocument.head प्रॉपर्टी दस्तावेज़ के <head> तत्व को संदर्भित करती है। आप इसकी आईडी या अन्य प्रॉपर्टीज़ प्राप्त कर सकते हैं।उदाहरण<!DOCTYPE html> <html> <head id = "myid"> <title>JavaScript Example</title> </head> <body> <h1>Employ