JSFiddle - React, Tailwind, and code Playground

by James Allardice

HTML

<a href="http://www.mypage.com?type=iPhone&userId=1">The 1 link</a>
<a href="http://www.mypage2.com?type=iPhone&userId=1">The 2 link</a>

JavaScript

$("a[href*='iPhone']").attr("href", function () {
    return this.href.replace("iPhone", "Android");
});