当Img 标签有空的src属性时(即<img src='' />)时,Chrome Version : 4.0.249.89 (38071)
URLs (if applicable) : Other browsers tested: Add OK or FAIL after other browsers where you have tested this issue: Safari 4: FAIL Firefox 3.x: FAIL (3.5 fixed <img> only) IE 7: FAIL (<script>, <link> don't cause requests, <img> does) IE 8: FAIL (<script>, <link> don't cause requests, <img> does) Opera 10: OK What steps will reproduce the problem? 1. Place <img src="">, or <script src="">, or <link rel="stylesheet" href=""> into a page. 2. Load the page in Chromium while monitoring HTTP traffic. What is the expected result? There should be only one request to the page.
可能会建立新链接或使
http://stackoverflow.com/questions/3483402/aware-of-img-tags-with-empty-src-in-chrome
io多打开几次;
https://code.google.com/p/chromium/issues/detail?id=38144
综上:
src最好赋值为(//:0和javascript:void(0))
refer||[http://stackoverflow.com/questions/5775469/whats-the-valid-way-to-include-an-image-with-no-src]
备注:void 0 ===undefined(会执行表达式getValue(),但返回值是undefined!)