Answers for "get url value in javascript"

1

get value from url

// view.jsp?id=101
let queryString = window.location.search; 
let urlParams = new URLSearchParams(queryString);
let opportunity_id = urlParams.get('id');
Posted by: Guest on September-30-2021
3

get url from string javascript

function Purify(text) {
    var urlRegex = /^(https?:\/\/)?([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w \.-]*)*\/?$/;
    return text.replace(urlRegex, function (url) {
        return '<a class="text-blurple" target="_blank" href="' + url + '">' + url + '</a>';
    })
}
Posted by: Guest on October-03-2021
0

get url from string javascript

var testUrl = variable.match(/'(http:[^\s]+)'/)
Posted by: Guest on August-08-2021

Code answers related to "get url value in javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language