I am writing a java script code so that when a user loads a page, they are prompted with a window. Then I will put the user input into a function which will define the size of the users input. I have the window prompt, but cannot figure out how to get the user input concatenated with the <h1> tag, here is what I have so far, please give me your thoughts.
<html xmlns = “http://www.w3.org/1999/xhtml”>
<head>
<title>Using Parameters</title>
<script type = “text/javascript”>
var input1 = window.prompt(“Please enter the text that you would like to display for the top Heading.”, “Boe is the King of Java Script!” );
function run( x ) {
document.writeln( "<h1 align = 'left' value=" + input1 + ">" );
}
</script>
</head>
<body>
<script type=“text/javascript”>
run( input1 )
</script>
</body>
</html>