補充右邊編輯器第7和15行,實現(xiàn)如下功能: 網(wǎng)頁中有一按鈕(名字"點擊我"),當點擊按鈕后調(diào)用函數(shù)contxt(),彈出對話框"哈哈,調(diào)用函數(shù)了!"。
補充右邊編輯器第7和15行,實現(xiàn)如下功能:
網(wǎng)頁中有一按鈕(名字"點擊我"),當點擊按鈕后調(diào)用函數(shù)contxt(),彈出對話框"哈哈,調(diào)用函數(shù)了!"。
補充右邊編輯器第7和15行,實現(xiàn)如下功能:
網(wǎng)頁中有一按鈕(名字"點擊我"),當點擊按鈕后調(diào)用函數(shù)contxt(),彈出對話框"哈哈,調(diào)用函數(shù)了!"。
2020-02-08
舉報
2020-02-08
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>函數(shù)調(diào)用</title>
? ?<script type="text/javascript">
? ? ? function contxt() //定義函數(shù)
? ? ? {
? ? ? ? ?alert("哈哈,調(diào)用函數(shù)了!");
? ? ? }
? ?</script>
</head>
<body>
? ?<form>
? ? ? <input type="button"? value="點擊我" onclick=" contxt()" />??
? ?</form>
</body>
</html>
2020-05-14
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>函數(shù)調(diào)用</title>
?? <script type="text/javascript">
????? function contxt() //定義函數(shù)
????? {
???????? alert("哈哈,調(diào)用函數(shù)了!");
????? }
?? </script>
</head>
<body>
?? <form>
????? <input type="button"? value="點擊我" onclick="contxt()"> ?
?? </form>
</body>
</html>