Javascript 从图像创建弹出窗口
在我的网站中,我有一个带有facebook图标的股票期权,当点击它在新页面中打开一个网页时,我想尝试在原始页面中打开一个弹出窗口,但内容相同,这是需要调用的特定类型的目标吗 这里我留下一个代码示例: 代码中的“_blank”是目标Javascript 从图像创建弹出窗口,javascript,html,wordpress,Javascript,Html,Wordpress,在我的网站中,我有一个带有facebook图标的股票期权,当点击它在新页面中打开一个网页时,我想尝试在原始页面中打开一个弹出窗口,但内容相同,这是需要调用的特定类型的目标吗 这里我留下一个代码示例: 代码中的“_blank”是目标 if(strpos($atts['on'], "fb") !== false) $html .= aTag("https://www.facebook.com/sharer/sharer.php?u=".$atts['href'], getImgTagByImageN
if(strpos($atts['on'], "fb") !== false) $html .= aTag("https://www.facebook.com/sharer/sharer.php?u=".$atts['href'], getImgTagByImageName($atts['fb-icon']), "_blank", $atts['id'], $atts['class']);
以下是创建弹出窗口的链接。
在您的案例中:
<div class="popup" onclick="myFunction()">Click me!
<span class="popuptext" id="myPopup">Popup text...</span>//your image goes here
</div>
点击我!
弹出文本…//您的图像显示在此处
这是创建弹出窗口的链接。在您的案例中:
<div class="popup" onclick="myFunction()">Click me!
<span class="popuptext" id="myPopup">Popup text...</span>//your image goes here
</div>
点击我!
弹出文本…//您的图像显示在此处
尝试窗口。打开(strUrl、strWindowName、[strWindowFeatures])
大概是这样的:
window.open('http://fb.com', 'fbShareWindow', 'height=[HEIGHT], width=[WIDTH], top=[TOP], left=[LEFT], toolbar=0, location=0, menubar=0, directories=0, scrollbars=0');
在JSFIDLE上尝试下面的代码片段。它在这里不起作用,因为SO和Fiddle都会阻塞包含弹出窗口的代码
window.share=function(){
打开窗户http://fb.com'、'fbShareWindow'、'height=[height]、width=[width]、top=[top]、left=[left]、toolbar=0、location=0、menubar=0、Directory=0、scrollbars=0');
}
共享我
尝试窗口。打开(strUrl、strWindowName、[strWindowFeatures])
大概是这样的:
window.open('http://fb.com', 'fbShareWindow', 'height=[HEIGHT], width=[WIDTH], top=[TOP], left=[LEFT], toolbar=0, location=0, menubar=0, directories=0, scrollbars=0');
在JSFIDLE上尝试下面的代码片段。它在这里不起作用,因为SO和Fiddle都会阻塞包含弹出窗口的代码
window.share=function(){
打开窗户http://fb.com'、'fbShareWindow'、'height=[height]、width=[width]、top=[top]、left=[left]、toolbar=0、location=0、menubar=0、Directory=0、scrollbars=0');
}
分享我