<!DOCTYPE html>
<html lang=”en”>
<head>
    <meta charset=”UTF-8″>
    <title>Document</title>
</head>
<body>
    <!–<input type=”text” id=”id_name” name=”name” value =”<?echo $_POST[name]; ?>” > –>
    <input type=”text” id=”id_name” >
<script>
document.getElementById(“id_name”).value = “urqt”; //escriu valor
</script>
<script >
 a=   document.getElementById(“id_name”).value //llegeix valor
</script>
<script>
    alert(a); //valor llegit
</script>
</body>
</html>

		
Shift F6
