|
|
|
| люди этот скрипт:
<form name=www>
<select name="test" onchange="selChange(this);">
<option>Пункт 1</option>
<option>Пункт 2</option>
<option>Пункт 3</option>
<option>Пункт 3</option>
</select>
<input type="button" value="Text" onclick="selText(this.form)" />
</form>
Скрипт
<script type="text/javascript">
function selChange(list)
{
var newText = (list.options[list.selectedIndex].value);
if (newText)
{
alert(newText);
}
}
function selText(form)
{
var newText = (form.test.options[form.test.selectedIndex].value);
alert(newText);
}
</script>
|
Работает только в googlhrom, а в explorer и firefox не работает чем это мож объяснить? | |
|
|