$("#siteUrl").val('http://');$("#siteUrl").focus(); IE6下光标会定位在前面: 而将两行代码换过来: $("#siteUrl").focus();$("#siteUrl").val('http://'); IE6下光标会定位在后面: