IE下png图形的另一种处理方法(2) * 2004-04-25 Fixed PNG image printing, eliminated need for external * GIF file, fixed intermittent uninitialised variable * error [by AG, <http://www.scss.com.au/family/andrew/> ] * 2004-09-30 Reverted inline Javascript image to transparent GIF. The * new XP SP2 'security' measures prevented the JS image * from working. [by AG] * 2004-10-22 Rewrote fixImage() to try and work around some reported * problems with PNGs vanishing! [by AG] * */
var IS_PNG = /.png$/i; /* <-- NOTE: remove the "\-trans" to process *all* PNGs */ var supported = /MSIE (5\.5)[6789]/.test(navigator.userAgent) && navigator.platform == 'Win32'; var realSrc; var blankSrc = 'images/blank.gif'; if (supported) fixImage(); function propertyChanged() { if (supported && event.propertyName == 'src' && element.src != blankSrc) { fixImage(); } } function fixImage() { if (realSrc && element.src == realSrc) {