Question:

Is there a Javascript function similar to the "InputBox" function in VBScript?

Answer:

Yes, use prompt(Question, Default) as shown below.

<script type="text/javascript">
<!--

var answer = prompt ("What is your age?","20");
alert ("You are " + answer + " years old.")

// -->
</script>