js外部样式如何导入

来源:互联网 发布:迅雷极速版 mac 编辑:程序博客网 时间:2024/05/29 23:24
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>js外部样式如何导入</title>
<!--导入外部样式-->
<script type="text/javascript" src="outsetJS.js"></script>
</head>


<body>
<form>
<input type="button" value="点击我" onclick="Hello();"/>
</form>
</body>

</html>


外部js文件:(outsetJS.js)

// JavaScript Document

function Hello(){
alert("我是外部样式!");
}

0 0
原创粉丝点击