Здравствуйте! первый пример работает отлично!
function set()
{
var send1;
var to;
var text;
send1 = document.getElementById('send1');
to = document.getElementById('to');
text = send1.innerHTML;
to.value = send1.firstChild.nodeValue;
}
<form name="sender" method="post" action="pay" id="send_forum">
<input name=name1 value="" type="text" id="to">
<input type="submit" name="submit" onclick="set();" value="старт"></form>
а вот второй = не работает
function submit()
{
var send1;
var to;
var text;
send1 = document.getElementById('send1');
to = document.getElementById('to');
text = send1.innerHTML;
to.value = send1.firstChild.nodeValue;
}
здесь я set поменял на submit
<form name="sender" method="post" action="pay" id="send_forum">
<input name=name1 value="" type="text" id="to">
<a href=javascript:void OnClick=\'document.getElementById("send_forum").submit(); return false;\' class="ddottlog">старт</a></form>
и чего то не то
