<!DOCTYPE html>
<html>
<head>
<title>乘法表</title>
<meta charset="utf-8">
<script type="text/javascript">
function multiX(x) {
var str = "";
for (var i = 1; i <=9; i++) {
document.write(x+" * "+i+" = "+x*i+"</br>")
}
}
var number1;
do{
number1 = parseFloat(prompt("please input a number",""));
if (!isNaN(number1)) {
multiX(number1);
} else {
alert("please input a number");
continue;}
} while (number1 == -1)
</script>
</head>
<body>
</body>
</html>
MMMHUHU
相关分类