我正在处理此共享窗口,但我不知道如何正确编写它!
我想做这样的事情:“link”,“title”,200,200
var sharelink = "'http://www.facebook.com/sharer.php?s=100&p[title]=Promozione&p[url]=http://www.mysexyurl.com&p[summary]=mysexysummaryhere&p[images][0]=http://contat.eu/facebook/vtour/"+modello[i][1]+"','Condividi%20su%20Facebook','600','600'";
<div onclick="popup("link","title",200,200)"
有关详细信息,请参阅 http://jsfiddle.net/Z9AUH/1/
答案 0 :(得分:1)
好的,这是解决方案
<script>
var popuper = function (pageURL, title, w, h) {
var left = (screen.width / 2) - (+w / 2);
var top = (screen.height / 2) - (+h / 2);
var targetWin = window.open(pageURL, title, 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=' + w + ', height=' + h + ', top=' + top + ', left=' + left);
}
</script>
<div onclick="popuper('a','b','222','222')">WHY IT DOESNT WORK!!</div>
小提琴只需将所有内容放到html窗口