Hide radio buttons in JavaScript on button click

Hide radio buttons in JavaScript on button click


In Asp.net Programming with html code hide the radio buttons on click, the radio button shown only when the user clicks on  button name Show ,here we give  the sample
program(code of Segment).In the blog you give some important code of segment which are use in asp.net Programming for web development.

Hide radio buttons in JavaScript Code:


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">



<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <script type="text/javascript">
        var radioButtonContainer = document.getElementById('radioButtonContainer');
        radioButtonContainer.style.display = 'none';

        document.getElementById('theButton').onclick = function () {
            radioButtonContainer.style.display = 'block';
        };
</script>
</head>
<body>
<div id="radioButtonContainer">
    <input type="radio" name="Button1" value="option1" id="Button1" /><label for="Button1">Option1

</label><br />
    <input type="radio" name="Button2" value="option2" id="Button2" /><label for="Button1">Option2

</label><br />
    <input type="radio" name="Button3" value="option3" id="Button3" /><label for="Button1">Option3

</label><br />
</div>
</body>
</html>

In this Html code we make a file in asp.net ,In this Html programming code take three button Buttton1,Button2,Button3 and arrange these inside a div consider id of div is “radioButtonContainer”  with in the body tag.
As we know that html is a tag base Programming language.

And in the head tag write some code of javascript Programming language.As we know javascript is client side Programming language, Means it run on the client side.

Other Post: