我试图在函数中使用多个参数来显示结果,但我的代码无法显示结果。谁能帮我知道我做错了什么?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>How to write JavaScript?</title>
<script type="text/javascript">
// Using multiple parameters with function
function result( number1, number2, number3)
{
document.write("your luck number is " + number1 + number2 + number3);
}
</script>
</head>
<body>
<hr>
<h2>Using multiple parameters with function</h2>
<input type="button" value="Result" onclick=result(3, 6, 9);>
</body>
</html>