Href link with OnClick event

2019-08-21 03:33发布

i am having a link like below where on click of that twitter , i need to open the twitter 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..

1条回答
该账号已被封号
2楼-- · 2019-08-21 04:06

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;">
查看更多
登录 后发表回答