Why does this bookmarklet JS code not work when put in an onclick handler?
问题 I have a pretty typical bookmarklet code that's working perfectly for me in all browsers. However, when I take this code and put it in an HTML's element onClick handler, it doesn't work in IE (6, 7, or 8). This is the code: javascript: ( function(){ function l(i,u){ var d=document; var s; try{ s=d.standardCreateElement('script'); }catch(e){} if(typeof(s)!='object') s=d.createElement('script'); try{ s.type='text/javascript'; s.src='http://{Domain}/bk/' + u; s.id='s_' + i; d