psubbiah93@gmail.com

Tuesday, 17 November 2015

Get Query String from url in JavaScript


http://192.168.1.59/peacesoft/wisdom/login?rd=author-my-article#artSubmit

 function getParameterByName(name) {
    var match = RegExp('[?&]' + name + '=([^&]*)').exec(window.location.search);
    return match && decodeURIComponent(match[1].replace(/\+/g, ' '));
}

    $(document).ready(function() {

 var rul = window.getParameterByName('rd');
 console.log(rul);
 document.getElementById('rurl').value  = rurl.value+'#'+window.location.hash.substr(1);

 });
Unknown Web Developer

Hello! I am Subbiah P and this is my web technologies blog. My specialities are PHP, Asp.net, jQuery, and CMS web application development. I do accept paid work. Write to me to start working on your dream project . I am Working as Web developer in Peace Soft Technologies

No comments:

Post a Comment