最贊回答 / 慕粉3364548
<!DOCTYPE html><html>?<head>? <title> new document </title>??? <meta http-equiv="Content-Type" content="text/html; charset=gbk"/>? ?? <script type="text/javascript">??? ??? ? // 新窗口打開時彈出確認框,是否打開? ? function openWi...
2020-07-15
最新回答 / tidy5171858
如果不寫這個按鈕,你可以將? var mychar="I love javascript";? alert("hello");不寫在函數(shù)里面,就可以直接輸出,但是寫在了函數(shù)里面,就需要有事件去觸發(fā)這個函數(shù),有單擊,雙擊,當鼠標移動到上面等這些事件都可以觸發(fā)。
2020-07-14
最新回答 / qq_洞天_0
function openWindow(){? ? ? ? var myindex = confirm("確認打開新窗口嗎?");? ? // 新窗口打開時彈出確認框,是否打開if(myindex == true){? ? window.open('http://idcbgp.cn/','新窗口','width=400,height=500,menubar=no,status=no,scrollbars=yes');}? ? }
2020-07-07
最新回答 / 前端學習中
如果b不為空值,就是說添加了網(wǎng)址進去,就執(zhí)行這個指令,你再補充一個else,把網(wǎng)址去掉,就能看到空值下輸出的東西<!DOCTYPE?html><html><head>????<title>Test</title>????<script?type="text/javascript">????????function?openWindow()?{????????????var?a?=?confirm("是否打開新窗口");????????...
2020-07-03