How to Select Radio Button in javascript Via?

Hi Below code radio button selection sample script.
<script language=”javascript” type=”text/javascript”>
// For Radion Button Selected option

document.getElementById(‘sample’).checked = true;
if(document.getElementById(‘sample’).checked == true){
document.getElementById(‘sample’).style.display = ‘block’;
document.getElementById(‘sample’).disabled = false;
document.getElementById(‘sample’).disabled = false;
document.getElementById(‘sample’).disabled = false;
document.getElementById(‘sample’).disabled = false;
document.getElementById(‘sample’).disabled = false;
}
</script>

the above code is useful for yours more place. Enjoy its for very useful sometime in dynamic javascript section also. This is one of the small Javascript Via Radio Button Selection Sample.

Simple coment hide script for WordPress Site?

<script type=”text/javascript” language=”javascript”>

//alert(document.getElementById(‘comments’));

var comLength = document.getElementById(“comments”).innerHTML;

/*alert(comLength);

alert(comLength.length);*/

if(comLength.length == “0”){

//alert(‘test’);

document.write(‘<style type=”text/css”>#comments{display:none;}</style>’);

}

else{

document.write(‘<style type=”text/css”>#comments{display:block;}</style>’);

//alert(“Test Else”+comLength.length);

}

</script>

© 2020 Spirituality