我正在尝试创建一个程序来重复输入的单词,因为它有字符,我已经尝试了几种不同的方法,但这些方法都不起作用,这是迄今为止的工作。
<html>
<head>
<title>Repeat Word</title>
<script type="text/javascript">
//Program: Repeat Word
//Purpose: Repeat word for as many times as it has characters
//Date last modified: 4/11/12
var word = "";
word = prompt("Enter the word you would like repeated?")
</script>
</head>
<body>
</form>
</body>
</html>
我希望它重复打招呼的一个例子是......
Enter a word: Hello
Hello
Hello
Hello
Hello
Hello