当此应用程序的用户对字段进行更改时,需要在其他字段中进行大量更改。通常,即使使用优化的脚本,浏览器也会在 IE 中阻止用户输入超过 1 秒。为了阻止发生,我这样做:
var i = 100;
GetTextInputs().filter('[' + name + ']').each(function()
{
setTimeout("DoWork('" + this.id + "', '" + v + "', '" + name + "');", i);
i += 25;
});
这对我来说有点骇人听闻,但效果很好。
- 这种方法有什么问题吗?
- 或者,有没有更好的方法?