循环之类的例子
<script language="javascript"> function calculate(a, b) { return a * b; } document.write(calculate(15, 15)); var i = 30; while (i > 0) { document.write("-" + i); i--; } for (i=1; i<=9; i++) { document.write(i+"*"+i+"="+i*i+" "); } </script> <input type="submit" name="Submit" value="Click Here" onClick="javascript:alert(‘You click this button.‘)">
时间: 2024-10-05 15:59:05