Href link with OnClick event
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;">
精彩评论