大神們,為什么我的點(diǎn)擊了沒有彈窗
<!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=utf-8" />
<title>我們互動下</title>
<script type="text/javascript">
? function rec()
? {var mython("關(guān)注JS高級篇");
? ? alert (mython);
? }
</script>
</head>
<body>
<input name="button" type="button"onclick="rec()" value="JS進(jìn)階篇" />
</body>
</html>
2019-02-21
定義變量的時候,如果你要給這個變量賦值,一定要記得加=號,也就是賦值
2019-02-20
樓上說得對哦 就是差一個等號
2019-02-20
2019-02-20
只定義了函數(shù),但沒有調(diào)用。在</script>上一行加入 rec()試試