<script type="text/javascript">
function contxt() //定义函数
{
alert("哈哈,调用函数了!");
}
</script>
</head>
<body>
<form>
<input type="button" value="点击我" onclick="contxt()" />
</form>
</body>
<script>函数名()</script>
谢谢老板
<script type="text/javascript">
function contxt() //定义函数
{
document.write("哈哈,调用函数了!");
}
</script>
</head>
<body>
<script>contxt()</script>
</body>