<html>
<head>
<script type = "text/javascript">
<!--
var func = function(x,y) {
return x*y
};
function secondFunction() {
var result;
result = func(10,20);
document.write ( result );
}
//-->
</script>
</head>
<body>
<p>点击下面按钮,调用函数</p>
<form>
<input type = "button" onclick = "secondFunction()" value = "调用函数">
</form>
</body>
</html>