摘要
由于受客户端控件加载图片时间段影响,以及JS(Java Script)的异步执行模式制约,往往对客户端控件所加载的图片进行处理,会出现图片未加载完.而JS处理代码已经开始执行的情况,此时会造成JS相关代码执行错误。该文就这种在WEB页面开发过程中常见的问题进行了详细分析,并在此基础上设计了相应解决方案,给出了部分关键代码。
Due to client controls affect the time you load your images, and JS (JavaScript) of asynchronous execution mode constraints are often loaded on the client-side controls the image processing, there will be finished picture is not loaded, while the JS processing code the situation has already begun at this time would cause JS errors related to code execution. In this paper, the development process in the WEB page frequently asked questions are analyzed in detail, and on this basis to design the corresponding solution, and given some key code.
出处
《电脑知识与技术》
2010年第02Z期1223-1224,共2页
Computer Knowledge and Technology
关键词
预加载
异步执行
本地加载
浏览器缓存
pre-load
asynchronous implementation
local load
browser cache