TIM*_*MEX 40 html javascript css anchor templates
<a href="facebook.com/sharer" target="_blank" >Share this</a>
Run Code Online (Sandbox Code Playgroud)
当用户点击它时,如何在新窗口中将其设置为特定宽度和高度?在firefox中,当前代码只打开一个新选项卡(而不是新窗口)
Mar*_*ona 121
要在具有维度和所有内容的新窗口中打开,您需要调用JavaScript函数,因为target ="_ blank"将不允许您调整大小.一个例子是:
<a href="http://www.facebook.com/sharer" onclick="window.open(this.href, 'mywin',
'left=20,top=20,width=500,height=500,toolbar=1,resizable=0'); return false;" >Share this</a>
Run Code Online (Sandbox Code Playgroud)
希望这对你有所帮助.