document.getElementById('src').focus();
document.execCommand("selectall");
document.execCommand("Delete");
document.GetElementById('onlinesrc').Focus();//这句无效
谁知道什么原因啊!src为一input type=file标签 onlinesrc为text 标签名册或者哪个知道当text文档获得焦点时将file里内容清空的其它办法啊?
document.execCommand("selectall");
document.execCommand("Delete");
document.GetElementById('onlinesrc').Focus();//这句无效
谁知道什么原因啊!src为一input type=file标签 onlinesrc为text 标签名册或者哪个知道当text文档获得焦点时将file里内容清空的其它办法啊?
var file1 = document.getElementById('src').value;
if (file1!="") { //防止死循环
document.getElementById('src').focus();
document.execCommand("selectall");
document.execCommand("Delete");
setTimeout("document.getElementById('onlinesrc').focus();",10); //延时即可
}