<!DOCTYPE?HTML>
<html>
<head>
<meta?http-equiv="Content-Type"?content="text/html;?charset=utf-8"?/>
<title>單擊事件?</title><script?type="text/javascript">??
function?openwin()
{?????
window.open('?
</script></head><body>??<form>????
<input?name="點(diǎn)擊我"?type="button"?value="點(diǎn)擊我"?onclick=?"openwin()"/>??</form></body></html>
<!DOCTYPE?HTML>
<html>
<head>
<meta?http-equiv="Content-Type"?content="text/html;?charset=utf-8"?/>
<title>window.open</title>
<script?type="text/javascript">??
function?Wopen(){?????????
window.open('http://www.baidu.com','_blank','width=1366,height=768,menubar=yes,toolbar=yes,?
status=yes,scrollbars=yes')?;??}??????
</script></head><body><form>????
<input?name="button"?type="button"?onClick="Wopen()"?value="點(diǎn)擊我,打開新窗口!">
</form></body></html>
2021-04-02
因?yàn)開blank是從新窗口打開
2020-08-19
第一段代碼是不是少了? 第二段代碼window.open給了_blank屬性 是從新窗口打開? 好像是吧?