Stopping IE from highlighting the first submit-button in a form

前端 未结 6 1862
庸人自扰
庸人自扰 2020-12-03 18:12

The expected behaviour on enter in a form seems to be undefined in the HTML 4.01 Specification while the HTML 5 specification says it should be the first submit button in th

6条回答
  •  醉酒成梦
    2020-12-03 18:16

    If you are using .Net 2 this may help you

    ...Use the DefaultFocus property to access the control on the form to display as the control with input focus when the HtmlForm control is loaded. Controls that can be selected are displayed with a visual cue indicating that they have the focus. For example, a TextBox control with focus is displayed with the insertion point positioned inside of it. ...

提交回复
热议问题