Javascript-форум (https://javascript.ru/forum/)
-   Общие вопросы Javascript (https://javascript.ru/forum/misc/)
-   -   Сохранить значение переменной (https://javascript.ru/forum/misc/58672-sokhranit-znachenie-peremennojj.html)

Phoenix_ 04.10.2015 00:07

Сохранить значение переменной
 
Доброго вечера всем!Возник вопрос по поводу того как занести значение с текстового поля в скрипт.Не хочет работать и все тут.:help:




function one() 
		{ var id;
		var wow = document.getElementById('wow');
		id=window.open("","example","width=400,height=150");
		id.focus();
		id.document.open();
		id.document.write("Hello");
		id.document.write(wow);
		id.document.write("<form>");
		id.document.write("<input type=\"button\" value=\"Закрыть       окно\" onclick=\"window.close();\"></form>");
		id.document.close();
		}



<table>
	<tr>
		<td class="no3">Какие-нибудь данные:</td>
		<td><input class="pole" type="text" id="wow"></td>
	</tr>
</table>
<input class="no1" type="button" value="Отправить" onclick="one()"/>

sortarray 04.10.2015 01:05

<html>
<head>
</head>
<body>

<input id="wow">
<button id="b">open</button>

<script>



b.onclick = function(){
  var w = open("")
  w.document.write(wow.value)
  w.document.write("<button onclick='window.close()'>close</button>") 
}



</script>
</body>
</html>

Phoenix_ 04.10.2015 01:24

Большое спасибо!


Часовой пояс GMT +3, время: 01:21.