■ 語法主題:全選表單內容(1)

全選

■ 控制碼內容:
將下面複製至 <body> 標籤後
<script language="Javascript">
<!--
function selectAll(theField) {
var tempval=eval("document."+theField)
tempval.focus()
tempval.select()
}
//-->
</script>

<form name="test">
<a href="javascript:selectAll('test.select1')">全選</a><br>
<textarea name="select1" rows=3 cols=40>This is some text. This is some text. This is some text. This is some text.</textarea>
</form>