-3
I am inciante and tho with a doubt that it looks simple but I did not find a response, mto provable that I tho letting a silly thing pass, but I am not managing to pass a value of a text input inside a form to another html file, where is wrong? The variable that is in another file that should save this value is not receiving any object?
<form action="./teste2.html" method="post">
<input type="text" id='teste' name='teste'>
<button type="submit">clique</button>
</form>
</body>
------ teste2-----
<script>
```try{
var b = document.getElementById('teste').value
window.alert(b)
}catch(error){
window.alert(error)
}
</script>```
So I can’t send information to a file in html format? I know I can’t manipulate data in html but in body has js, this information I try to pass does not reach the script? I’m inciante really. Could I get soh in js and html without php msm? vlw by attention//
– Guito al
Not Submit/POST, but Voce can pass through the URL. Example: No Index.html window.Location = "index2.html? variable=123";
– Bruno Henrique
vlw bro, then post Voce uses only to send files that manipulate data. I found a way to use get so how do I get this parameter from the url? sla type take each value that was passed to url and play td in an array
– Guito al
Have a friend here from the site who already asks a similar question, at a glance: https://answall.com/questions/75557/passando-values-js-para-outra-pagina-html RememberIf, we have all been beginners at some point and there will always be other times that we will need to learn new technologies and become beginners again. Continue studying and success!
– Bruno Henrique