要选择select的内容,必须点击鼠标三下才能选择,能不能只要点击一下或者鼠标移上去就可以选择select的内容?代码如下:
<textarea id="parentTA" name="parentTA" cols="40" rows="10">Parent Textarea</textarea>
<select id="childTC" name="dddddd"> <option>ddddddd</option>
<option>dddddddd</option>
</select><Script Language="JScript">
parentTA.appendChild(childTC);
function f()
{
window.alert('value:' + parentTA.value + '\n innerHTML:' + parentTA.innerHTML);
}
</Script>
<input type="button" value="按钮" name="B3" onclick="f()";></BODY>
<textarea id="parentTA" name="parentTA" cols="40" rows="10">Parent Textarea</textarea>
<select id="childTC" name="dddddd"> <option>ddddddd</option>
<option>dddddddd</option>
</select><Script Language="JScript">
parentTA.appendChild(childTC);
function f()
{
window.alert('value:' + parentTA.value + '\n innerHTML:' + parentTA.innerHTML);
}
</Script>
<input type="button" value="按钮" name="B3" onclick="f()";></BODY>
只有IE里才认的
textarea只是是个文字型容器