$("#siteUrl").val('http://');
$("#siteUrl").focus();

IE6下光标会定位在前面:

javascript中的focus()光标定位

而将两行代码换过来:

$("#siteUrl").focus();
$("#siteUrl").val('http://');

IE6下光标会定位在后面:

javascript中的focus()光标定位

相关文章:

  • 2022-12-23
  • 2021-06-05
  • 2021-08-23
  • 2022-12-23
  • 2021-12-31
  • 2021-09-11
  • 2022-12-23
猜你喜欢
  • 2021-12-28
  • 2022-01-22
  • 2022-12-23
  • 2021-10-08
  • 2022-12-23
  • 2021-05-30
  • 2021-12-17
相关资源
相似解决方案