<html>
<head>
<meta charset="utf-8">
<script>
function test(){
var name = document.getElementById('name').value;
var snumber = document.getElementById('snumber').value;
document.write("name="+name+"");
document.write("&snumber="+snumber+"<br />");
}
</script>
</head>
<body>
<h2>Example of sending data using POST</h2>
Name :
<input type="text" id="name"><br/>
Student number:
<input type="text" id="snumber"><br/><br/>
<input type="button" value="submit" onclick="test();">
</body>
</html>
I want to change the font size of 6th and 7th lines' result to h2 size I can change in body section by putting
<h2></h2>
however, it's not working in a script section. If I input data in name and snumber section, It connects to a new page that shows inputs like "name=David&snum=21467564" I want this font size to be h2 size!