悬赏园豆:10
[已解决问题]
解决于 2008-08-18 17:29
<DL class=code>
<DT>HTML code
<DD><PRE><DIV><!--
Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/
--><SPAN style="COLOR: #0000ff"><!</SPAN><SPAN style="COLOR: #ff00ff">DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"</SPAN><SPAN style="COLOR: #0000ff">></SPAN><SPAN style="COLOR: #000000">
</SPAN><SPAN style="COLOR: #0000ff"><</SPAN><SPAN style="COLOR: #800000">html </SPAN><SPAN style="COLOR: #ff0000">xmlns</SPAN><SPAN style="COLOR: #0000ff">="http://www.w3.org/1999/xhtml"</SPAN><SPAN style="COLOR: #0000ff">></SPAN><SPAN style="COLOR: #000000">
</SPAN><SPAN style="COLOR: #0000ff"><</SPAN><SPAN style="COLOR: #800000">head</SPAN><SPAN style="COLOR: #0000ff">></SPAN><SPAN style="COLOR: #000000">
</SPAN><SPAN style="COLOR: #0000ff"></</SPAN><SPAN style="COLOR: #800000">head</SPAN><SPAN style="COLOR: #0000ff">></SPAN><SPAN style="COLOR: #000000">
</SPAN><SPAN style="COLOR: #0000ff"><</SPAN><SPAN style="COLOR: #800000">body</SPAN><SPAN style="COLOR: #0000ff">></SPAN><SPAN style="COLOR: #000000">
</SPAN><SPAN style="COLOR: #0000ff"><</SPAN><SPAN style="COLOR: #800000">script </SPAN><SPAN style="COLOR: #ff0000">type</SPAN><SPAN style="COLOR: #0000ff">="text/javascript"</SPAN><SPAN style="COLOR: #0000ff">></SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">
</SPAN><SPAN style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">var</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"> bb</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">=</SPAN><SPAN style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">function</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">(){
document.onmouseup </SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">=</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"> </SPAN><SPAN style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">function</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">(){ alert(</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">1</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">); };
}
</SPAN><SPAN style="COLOR: #0000ff"></</SPAN><SPAN style="COLOR: #800000">script</SPAN><SPAN style="COLOR: #0000ff">></SPAN><SPAN style="COLOR: #000000">
</SPAN><SPAN style="COLOR: #0000ff"><</SPAN><SPAN style="COLOR: #800000">div </SPAN><SPAN style="COLOR: #ff0000">style</SPAN><SPAN style="COLOR: #0000ff">="width:100px;height:100px;background-color:#000000;"</SPAN><SPAN style="COLOR: #ff0000"> onmousedown</SPAN><SPAN style="COLOR: #0000ff">="bb()"</SPAN><SPAN style="COLOR: #0000ff">></SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff"></</SPAN><SPAN style="COLOR: #800000">div</SPAN><SPAN style="COLOR: #0000ff">></SPAN><SPAN style="COLOR: #000000">
</SPAN><SPAN style="COLOR: #0000ff"><</SPAN><SPAN style="COLOR: #800000">div </SPAN><SPAN style="COLOR: #ff0000">style</SPAN><SPAN style="COLOR: #0000ff">="width:100px;height:100px;background-color:#FF0000;"</SPAN><SPAN style="COLOR: #ff0000"> onmousedown</SPAN><SPAN style="COLOR: #0000ff">="bb()"</SPAN><SPAN style="COLOR: #0000ff">></SPAN><SPAN style="COLOR: #000000">123</SPAN><SPAN style="COLOR: #0000ff"></</SPAN><SPAN style="COLOR: #800000">div</SPAN><SPAN style="COLOR: #0000ff">></SPAN><SPAN style="COLOR: #000000">
</SPAN><SPAN style="COLOR: #0000ff"></</SPAN><SPAN style="COLOR: #800000">body</SPAN><SPAN style="COLOR: #0000ff">></SPAN><SPAN style="COLOR: #000000">
</SPAN><SPAN style="COLOR: #0000ff"></</SPAN><SPAN style="COLOR: #800000">html</SPAN><SPAN style="COLOR: #0000ff">></SPAN></DIV>
</PRE></DD></DL><BR><BR> <BR>当点住下面的div不放,并拖到浏览器外再放开会触发onmouseup <BR>但上面的div就会没有反应