不是高手,路过...<html>
<head>
<title>
focus method
</title>
<script language="JavaScript">
function SelectText()
{
document.ThisForm.inputword.select()
}</script>
</head>
<body >
<form name="ThisForm">
输入文字:<input type=text name="inputword" size=40><br>
<Br>
<input type=button value="选择文字" name="se1" Onclick="SelectText()"><Br>
<Br>
</form>
</body>
</html>

解决方案 »

  1.   

    要给form指定name属性,很简单的问题
    <form name="ThisForm">
      

  2.   

    没有帮我找到Debug 吗????
      

  3.   

    偶也是路过<html>
    <head>
    <title>
    focus method
    </title>
    <script language="JavaScript">
    function SelectText()
    {
    document.all.inputword.select()
    }</script>
    </head>
    <body >
    <form>
    输入文字:<input type=text name="inputword" size=40><br>
    <Br>
    <input type=button value="选择文字" name="se1" Onclick="SelectText()"><Br>
    <Br>
    </form>
    </body>
    </html>