English 中文(简体)
网上交流
原标题:Profile Link Sharing in Facebook and Twitter

我在Facebook和Twitter上有以下共享链接的 Java本。

<script type="text/javascript">
 function show_fb(id)
 {

 alert( http://www.facebook.com/sharer.php?u=
 http://devel.testingsite.biz/testxxxxx.php?cmd=profile&id= +id+  );

 u=location.href;
 t=document.title;window.open( http://www.facebook.com/sharer.php?u={https_server}testxxxxx.php?cmd=profile&id= +id+  , sharer , toolbar=0,status=0,width=626,height=436 );
return false;
}
 </script>

在超文本部分,其表现如下:

 <li><a href="javascript:void(0)" onclick="show_fb({uid});" class="icon_h3"></a></li>

这一职能运作良好,它显示共享窗口,但我所要分享的链接是没有补贴的。

但是,在报警职能中印刷的同样链接显示(如下文所示)。 我需要形成以下联系。

http://devel.testingsite.biz/testxxx.php?cmd=profile&id=645

Is there any mistake in my function?

问题回答

你们能否尝试?

    <script type="text/javascript">
 function show_fb(id)
 {

 alert("http://www.facebook.com/sharer.php?u=
 http://devel.testingsite.biz/testxxxxx.php?cmd=profile&id= +id+ ");

 u=location.href;
 t=document.title;
window.open("http://www.facebook.com/sharer.php?u={https_server}testxxxxx.php?cmd=profile&id= +id+  , sharer , toolbar=0,status=0,width=626,height=436");
return false;
}
 </script>




相关问题
selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

How to fire event handlers on the link using javascript

I would like to click a link in my page using javascript. I would like to Fire event handlers on the link without navigating. How can this be done? This has to work both in firefox and Internet ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Clipboard access using Javascript - sans Flash?

Is there a reliable way to access the client machine s clipboard using Javascript? I continue to run into permissions issues when attempting to do this. How does Google Docs do this? Do they use ...

javascript debugging question

I have a large javascript which I didn t write but I need to use it and I m slowely going trough it trying to figure out what does it do and how, I m using alert to print out what it does but now I ...

Parsing date like twitter

I ve made a little forum and I want parse the date on newest posts like twitter, you know "posted 40 minutes ago ","posted 1 hour ago"... What s the best way ? Thanx.

热门标签