Регистрация Войти
Войти через VK Войти через FB Войти через Google Войти через Яндекс
Войти через VK Войти через FB Войти через Google Войти через Яндекс
Поиск по сайту
При вводе текста в одном поле автоматическое изменение в другом
Исходный код этого примера:
<script type="text/javascript">
function PathRecip()
{
if(window.document.form1.urln.value.substr(window.document.form1.urln.value.length-1) != '/')
{
window.document.form1.url2.value = window.document.form1.urln.value;
if(window.document.form1.script.value == 'perl') window.document.form1.url2.value = window.document.form1.url2.value + '/cgi-bin';
window.document.form1.url2.value = window.document.form1.url2.value + '/recip/';
}
}
</script>
<form method="POST" name="form1">
<p>
<label>URL:<br>
<input type="text" name="urln" size=40 value="http://"
onselect="PathRecip(this);" onclick="PathRecip(this);"
onkeyup="PathRecip(this);" onfocus="PathRecip(this);"
onkeydown="PathRecip(this);" onkeypress="PathRecip(this);"
onchange="PathRecip(this);"></label> <i>адрес вашего сайта</i>
</p>
<p>
<label>Установлены скрипты для:<br>
<select name="script" onselect="PathRecip(this);" onclick="PathRecip(this);"
onkeyup="PathRecip(this);" onfocus="PathRecip(this);"
onkeydown="PathRecip(this);" onkeypress="PathRecip(this);"
onchange="PathRecip(this);">
<option value="php" >PHP
<option value="perl" >Perl
</select></label>
</p>
<p>
<label>Размещение скриптов на вашем сайте: <br>
<input type="text" name="url2" size=40 value="http://"></label>
<i>http://адрес вашего сайта/recip/</i>
</p>
<p>
<input type="submit" value="Добавить" style="font: 8pt" align="absmiddle" size="-1">
</p>
</form>
.
Прокомментировать/Отблагодарить