If to log out and press F5 several times focus don't set.
<script type="text/javascript">
$(document).ready(function() {
setTimeout(function() {
var logonField = document.getElementById('UserName');
if (logonField) {
logonField.focus();
logonField.click();
}
}, 200);
});
</script>
<%= Html.TextBoxFor(m => m.UserName, new { @class = "logonF开发者_高级运维ield", style = "width:100px;"})%><br/>
<%= Html.ValidationMessageFor(m => m.UserName) %>
you can user simple Java script which will call on
on load event of html body.
精彩评论