I need to update href value using jquery

后端 未结 7 439
南笙
南笙 2021-01-15 02:35

I need to update href value thorughout the page using jquery. Say href=\"http://www.google.com?gsec=account\" should be changed to href=\"http://account.google.com?gsec=acco

相关标签:
7条回答
  • 2021-01-15 03:05

    I think you left something out in your question. Nevertheless:

    var link = $("a"); // Or some other selector to access the link
    link.attr("href", "http://account.google.com?gsec=account");
    
    0 讨论(0)
提交回复
热议问题