1
So guys, I just need to get some HTML information and get back the result of the calculation, but I couldn’t.
<html>
<head>
<title>Calculadora</title>
<script language="javascript" type="text/javascript">
var calculadora = function (){
var pessoas = form1.pessoas.value;
var myCalc = pessoas*0,2;
parent.document.getElementById("calc").Text = myCalc;
}
</script>
</head>
<body>
<title>Calculadora</title>
Pessoas
<form name="form1">
<input type="Text" name="pessoas"><br>
<input type="submit" value="calcular" onclick="return calculadora()">
</form>
Resposta:
<input type="Text" id="calc" readonly ><br>
</body>
</html>
0,2
swap for0.2
. Where did this "Parent" ?– Ivan Ferrer