日期:2014-05-16  浏览次数:20451 次

弹出窗口里的输入框焦点都聚焦到第一个需要输入的输入框
下面写的为何就聚焦不到CompanyName输入框呢?
<div id="search-window" title="搜索" style="width: 600px; height: 300px; padding: 10px 20px;"  onload="document.getElementById('CompanyName').focus()">
    <div style="padding: 20px 20px 40px 40px;display:inline">
        <form id="frmSearch" name="form">
            <table class="tableForm datagrid-toolbar" style="width: 100%; height: 180px;">
                <tr>
                    <th>公司名称:
                    </th>
                    <td>
                        <input name="CompanyName" id="CompanyName" style="width: 150px;" />
                    </td>
                </tr>
                <tr>
                    <th>部门名称:
                    </th>
                    <td>
                        <input name="DepartmentName" id="DepartmentName" style="width: 150px;" />
                    </td>
                </tr>
                <tr>
                    <th>存放位置:
                    </th>
                    <td>
                        <input name="Location" style="width: 150px;" />
                    </td>
                </tr>                
            </table>
&n