alert()为什么不弹出警告框呢?
有一个萌弟 2020-06-30 01:14:08 <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>锋利的jQuery</title>
<link href="css/index.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="css/default.css" type="text/css"/>
<link rel="stylesheet" href="css/ceshi.css" type="text/css"/>
<script src="js/jquery.js"></script>
<style type="text/css">
.highlight {
background: #FF3300;
}
</style>
</head>
<body class="bg" id="top">
<div class="html">
<div class="html-main1">
<article class="html-main">
<div id="renshi">
<h1>认识jQuery</h1>
<div class="lr">
<h3>编写简单的jQuery代码</h3>
<form>
<button onclick="xianshi()">弹出警告框</button>
</form>
</article>
</div>
</div>
<script src="js/jquery.js">
$(function() {
function xianshi() {
alert("hello word!")
};
}
</script>
<!--**************************************-->
</body>
</html>