Test when you click on...">

how to replicate a href from javascript file

i have a link Test when you click on this link it loads up a popup dialog (it doesn't change to a new window location, etc) i now want to generate that url on the fly so i thought i would use jquery and something like this: $('#cartLink').live('click', function () { var count = $("#abc").text(); var url = "https://site.foxycart.com/cart?cart=view&MyCount=" + count; NOW SOMEHOW REPLICATE THE SAME WAY THE HREF WOULD HAVE WORKED }); so as you can see i can't use window.open(), etc. what is the best way to replicate the same behavior as if i would have clicked on the link with the href set.

以上就是how to replicate a href from javascript file的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » JavaScript 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准

联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏