<td colspan="2"><input type="Text" name="Customer" maxlength="65535" size="37" value="<? echo $Field[2] ?>" onfocus="this.select();"></td>

解决方案 »

  1.   

    <td colspan="2"><input type="Text" name="Customer" maxlength="65535" size="37" value="<? echo $Field[2] ?>" onfocus="javascript:form1.Customer.select();"></td>
    请高手解释以下onfocus="javascript:form1.Customer.select();的作用
      

  2.   

    input得到焦点时全选input的内容
      

  3.   

    "this.select();与onfocus="javascript:form1.Customer.select();有区别吗?
      

  4.   

    效果一样。 当然是用最简单的 
    on*****一般不需要写javascript: 
    <a href="javascript:这时才需写