Is it possible to pass inputted values from my website to any other website on the internet

Viewed 51

Is it possible to pass inputted values from my website to any other website on the internet. I have saved the input to localstorage. Now I want to pass it on to another website which requires a username. The other website has the input ID="userusername". Is it possible without the website expecting the value being posted with for example POST or GET method?

<!DOCTYPE html>
<html>
<head>
    <title></title>
</head>
<body>

<script type="text/javascript">

    function passvalues(){
        var pass=document.getElementByID("name").value;
        localStorage.setItem("textvalue", pass);
        return false;
    }

</script>

<form method="POST" action="whatever website">
    <input type="name" placeholder="Name" id="name"/>
    <input type="submit" placeholder="Login" onclick="passvalues();"/>
</form>

</body>
</html>
1 Answers

LocalStorage is limited to protocol of the specified page so you can pass your locally stored data to another website using post method. But this will not be the case if your protocol of the page changes.

Related