HTML DOM ins cite प्रॉपर्टी उस दस्तावेज़ का URL लौटाती है जिसके कारण टेक्स्ट डाला गया था।
सिंटैक्स
निम्नलिखित वाक्य रचना है -
रिटर्निंग स्ट्रिंग मान
insObject.cite
उदाहरण
आइए इन्स साइट . के लिए एक उदाहरण देखें संपत्ति -
<!DOCTYPE html>
<html>
<head>
<title>ins cite</title>
<style>
form {
width:70%;
margin: 0 auto;
text-align: center;
}
* {
padding: 2px;
margin:5px;
}
input[type="button"] {
border-radius: 10px;
}
</style>
</head>
<body>
<form>
<fieldset>
<legend>ins-cite</legend>
<h1>Fact:</h1>
<p>Water cannot persist on moon's surface.<ins id="newInfo" cite="https://www.example.com/water-ice-moon-surface-confirmed.html">Water ice found on moon in 2018.</ins>
</p>
<input type="button" onclick="showURL()" value="Show Evidence">
<div id="divDisplay"></div>
</fieldset>
</form>
<script>
var divDisplay = document.getElementById("divDisplay");
var insCite = document.getElementById("newInfo");
function showURL() {
divDisplay.textContent = 'Evidence at: '+insCite.cite;
}
</script>
</body>
</html> आउटपुट
यह निम्नलिखित आउटपुट उत्पन्न करेगा -
‘साक्ष्य दिखाएं’ . पर क्लिक करने से पहले बटन -

‘साक्ष्य दिखाएं’ . पर क्लिक करने के बाद बटन -
