开发者

Href link with OnClick event

开发者 https://www.devze.com 2022-12-25 17:41 出处:网络
i am having a link like below where on click of that twitter , i need to open the twi开发者_C百科tter page with themessage given in $markme_ddesc but instead when i click on the link , it simply moves

i am having a link like below where on click of that twitter , i need to open the twi开发者_C百科tter page with the message given in $markme_ddesc but instead when i click on the link , it simply moves to twitter.com without opening in a new window and with the message..

<a style="text-decoration:none;" href="http://www.twitter.com" onclick="window.open(\'http://twitter.com/home/?status=\'+encodeURIComponent(location.href)+\'-'.$markme_ddesc.'\');return false;">

Why so? how to resolve this?? Please help me..


Try:

<a style="text-decoration:none;" href="http://www.twitter.com" onClick="window.open('http://twitter.com/home/?status=\'+encodeURIComponent(location.href)+\'-'.$markme_ddesc);return false;">
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号