首页 > 开发 > JS > 正文

JS中function调用函数练习

2016-05-18 19:12:35  来源:慕课网
  <!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>函数调用</title>
<script type="text/javascript">
function contxt() //定义函数
{
alert("哈哈,调用函数了!");
}
  </head>
<body>
<form>
<input type="button" value="戳我吧" onclick="contxt() " />
</form>
</body>
</html>