I have a view that I want to store some URL parameters and have tried everything. Here is my current code.
Sample URL: https://www.facebook.com?username=""&password=""(I'm trying to collect the parameter values)
HTML:
<input id="urlInput" type="text" placeholder="Enter URL" class="form-control" />
Javascript:
var url = $("#urlInput").val();//This pulls the value of the input/URL with parameters
var getURLUser = url.substring(url.indexOf("?"));
$("#urluser").html(getURLUser);
What is wrong? Thanks.