亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

onclick打開窗口和特定大小

onclick打開窗口和特定大小

慕桂英4014372 2019-11-28 13:54:59
我有這樣的鏈接:<a href="/index2.php?option=com_jumi&amp;fileid=3&amp;Itemid=11" onclick="window.open(this.href,'targetWindow','toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,')我希望新的打開窗口以特定大小打開。如何指定高度和寬度?
查看完整描述

3 回答

?
慕碼人8056858

TA貢獻1803條經驗 獲得超6個贊

<a href="/index2.php?option=com_jumi&amp;fileid=3&amp;Itemid=11"

   onclick="window.open(this.href,'targetWindow',

                                   'toolbar=no,

                                    location=no,

                                    status=no,

                                    menubar=no,

                                    scrollbars=yes,

                                    resizable=yes,

                                    width=SomeSize,

                                    height=SomeSize');

 return false;">Popup link</a>

其中width和height是沒有單位的像素(width = 400而不是width = 400px)。


在大多數瀏覽器中,如果沒有設置換行符就無法編寫它,那么一旦設置了變量,所有內容都在一行中:


<a href="/index2.php?option=com_jumi&amp;fileid=3&amp;Itemid=11" onclick="window.open(this.href,'targetWindow','toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=SomeSize,height=SomeSize'); return false;">Popup link</a> 


查看完整回答
反對 回復 2019-11-28
  • 3 回答
  • 0 關注
  • 928 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號