[Solved] Want to find the url from html tag [closed]
Try the below $(function() { var a_href = $(‘#website-view a’).attr(‘href’); var decodedUri = decodeURIComponent(a_href); var url = decodedUri.split(“url=”)[1].split(“&”)[0]; alert(url); }); <script src=”https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js”></script> <div id=”website-view”> <ul> <li> <a target=”_blank” href=”https://stackoverflow.com/redir/redirect?url=http%3A%2F%2Ffacebook%2Ecom%2Fshwet&urlhash=GvM1″>My Facebook</a> </li> </ul> </div> 2 solved Want to find the url from html tag [closed]