While the input is working fine and producing the expected string output, I am struggling with creating arrays and not sure what to do next. Despite searching extensively, I have been unable to find a solution.
<body>
<form>
<fieldset>
<legend>
Url:
</legend>
<input type="url" ID="inputurl" value="please input a URL">
<input type="button" onclick="PlaceUrl()" value="try me">
</fieldset>
</form>
<p id="URLdemo"></p>
<script>
function PlaceUrl() {
var x = document.getElementById("inputurl").value;
document.getElementById("URLdemo").innerHTML = x;
//outputs the string fine
var arr1 = x.split(window.location.pathname);
var arr2 = str.array (window.location.pathname.split(arr1));
//this does nothing
}
</script>