Q1556 How can I ask the user their name and then display it on the page?
You are here: irt.org | FAQ | JavaScript | Misc | Q1556 [ previous next ]
Try:
<script language="JavaScript"><!--
document.write('Hello ' + prompt('What is your name','stranger'));
//--><script>©2013 Martin Webb 