Ajax - modify data string before get

$.ajax({
        type: 'GET',
        url: 'report.php',
        data: ({url: href})
 });

alert(href);

href = https://website.com

how do i remove the https from the url ?

Upvotes: 1

Views: 146

Answers (1)

Paul Alan Taylor
Paul Alan Taylor

Reputation: 10680

Just use Javascript's replace function on href.

href.replace('https://','');

Upvotes: 2

Related Questions