怎么出不來(lái)效果?
<!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>我們互動(dòng)下</title>
<script type="text/javascript">
function top1(){
??? var mystr=confirm("關(guān)注JS高級(jí)篇");
??? if(mystr==true){
??????? document.write("JS進(jìn)階篇");
??? }
??? else
??? {alert("網(wǎng)頁(yè)無(wú)顯示內(nèi)容");}
??? }
</script>
</head>
<body>
<from>
??? <input type="button" value="點(diǎn)擊顯示按鈕" onclick="top1">
</from>
</body>
</html>
2016-06-08
應(yīng)該是oncllick="top1()",點(diǎn)擊按鈕之后執(zhí)行top1()函數(shù),補(bǔ)齊()應(yīng)該就可以了
2016-06-12
mei jia ?()
2016-06-08
onclick點(diǎn)擊事件中函數(shù)沒(méi)加()