怎么出不來效果?
<!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 top1(){
??? var mystr=confirm("關注JS高級篇");
??? if(mystr==true){
??????? document.write("JS進階篇");
??? }
??? else
??? {alert("網頁無顯示內容");}
??? }
</script>
</head>
<body>
<from>
??? <input type="button" value="點擊顯示按鈕" onclick="top1">
</from>
</body>
</html>
2016-06-08
應該是oncllick="top1()",點擊按鈕之后執行top1()函數,補齊()應該就可以了
2016-06-12
mei jia ?()
2016-06-08
onclick點擊事件中函數沒加()