<html>
<form name=form1>
<select name=select1 onchange='selectOne()'>
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
</select>
<textarea name=text1></textarea>
</form>
<script language=javascript>
function selectOne() {
with (document.form1) {
text1.value = text1.value + select1[select1.selectedIndex].text + "\n";
}
}
</script>
</html>
<form name=form1>
<select name=select1 onchange='selectOne()'>
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
</select>
<textarea name=text1></textarea>
</form>
<script language=javascript>
function selectOne() {
with (document.form1) {
text1.value = text1.value + select1[select1.selectedIndex].text + "\n";
}
}
</script>
</html>
解决方案 »
- 请教QQ文件中转站的上传实现
- 求解决,小问题,但我不懂,一个变量的问题,在线等
- 这样的JAVASCRIPT函数怎么写?
- 这样的JS怎么写呀,谢谢了!
- 求坐标转换的js代码
- 100分问一个简单问题---如何用javascript将一个只读并且disable为真的文本框设置为可写!!!在线等!!
- 本论坛语法高亮/代码高亮的插件是什么?
- 请问window.document.form.A.value,其中A是字符串变量,怎么办?!
- js有没有办法读到子窗体中的源文件呀??
- 怎样将一组复选框定义为一个数组类型
- AA为一对象,AA.AddItem("ccc")意思,我在AA对象的定义中并未发现AddItem字样?huntout有oicq吗?我好象没有多少分了
- 求救,java script的问题。
var a = new Array();
function selectOne() {
with (document.form1) {
a[a.length] = select1[select1.selectedIndex].text;
text1.value = text1.value + a[a.length - 1] + "\n";
}
}
</script>