-
2009-02-20
使用swfobject设置swf的焦点 - [Flex RIA开发]
在web页面一打开后,如何是焦点定位于swf中
现在遇到问题,用focusManger.setFocus之后,光标无法再制定的textinput中闪烁
我使用的swfobject,能不能给个代码呢在html页面里面写代码swfobject.focus();
swfobject.addLoadEvent(loadEventHandler);
swfobject.addDomLoadEvent(domLoadHandler);
function loadEventHandler() {
BrowserHistory.flexApplication = swfobject.getObjectById("${application}");
}
function domLoadHandler(){
document.getElementById("${application}").focus();
}
或
document.getElementById("${application}").focus();
这一句就可以了
收藏到:Del.icio.us







