Javascript Write Properties

To Write in a TextBox / input / label:

document.getElementById(“sample”).value = “Hello”;

 

To Write in a divider / paragraph / span :

document.getElementById(“sample”).innerText = “Hello”;

 

To Write in a divider / paragraph / span     using FireFox :

document.getElementById(“sample”).textContent = “Hello”;

 

To Look for a word in a TextBox / input / label (if it does not find it, it returns null):

document.getElementById(“sample”).value.match(“Hello”);

 

To Look for a word in a divider / paragraph / span (if it does not find it, it returns null):

document.getElementById(“sample”).innerText.match(“Hello”);

 

To Look for a word in a divider / paragraph / span     using FireFox (if it does not find it, it returns null):

document.getElementById(“sample”).textContent.match(“Hello”);

 

To Set a Textbox / input / label / divider/ paragraph / span or anything else HIDDEN / INVISIBLE:

document.getElementById(“sample”).style.display = “none”;

 

To Set a Textbox / input / label / divider/ paragraph / span or anything else SHOW/ VISIBLE:

document.getElementById(“sample”).style.display = “block”;