Here's a one-liner (well, one line of actual logic) that uses jQuery to make autofocus work in IE. It bails out if the focus is already set--in other words, in any HTML5-capable browser.
$(function() {
$('[autofocus]:not(:focus)').eq(0).focus();
});
I explained how it works in my blog. And here is an updated jsFiddle that works in IE.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…