Get the value by Document ID
تبليغيرجى شرح بإيجاز لمإذا تشعر أنك ينبغي الإبلاغ عن هذا السؤال.
Can anyone let me know what issue is there in the below code.
Basically, whatever I write in the text box, “Hello Manu” should get changed.
Is this possible?
We can write this in Jquery. But I wanted to see if we can execute it without Jquery
<h1>Change the HTML content</h1>
<h2 id=”hcontent”>Hello Manu</h2>
<input id=’x’ type=”text” value = searchURL()></input>
<script>
function searchURL() {
document.getElementById(“hcontent”).innerHTML=x
}
</script>
أضف إجابة