JavaScript is a scripting language, not a type of language. Basically this is to do the process in the background, and it needs document.write display things in the browser. Also, if your document.write exceeds one line, be sure to put a + concatenation at the end of each line.
Example
<script type="text/javascript"> if(document.getElementById('number1').checked) { document.write("<h1>Hello" + "member</h1>"); } </script>
source share