日期:2014-05-16  浏览次数:20307 次

包含SELECT的拖动层变换OPTION时候为什么页面会闪?
网上找到很多拖动层的例子,但变换SELECT的OPTION时候会闪动,这是怎么回事?


<!DOCTYPE   html   PUBLIC   "-//W3C//DTD   XHTML   1.0   Transitional//EN "   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">
<html   xmlns= "http://www.w3.org/1999/xhtml ">
<head>
<meta   http-equiv= "Content-Type "   content= "text/html;   charset=utf-8 "   />
<title> DragTheDIV </title>
</head>

<body>
<div   id= "d1 "   style= "position:absolute;background:#eeeeee;top:20px;left:30px;width:200px;height:200px; ">
        <div   id= "title "   style= "position:relative;top:0px;left:0px;width:100%;height:30px;background:#ccddee; "> 标题栏 </div>
</div>

<div   id= "d2 "   style= "position:absolute;background:#dddddd;top:50px;left:50px;width:300px;height:300px; ">
<select   id= "d ">
<option   >   ddd </option>
<option   >   ff </option>
</select>
</div>
<script   language= "javascript "   type= "text/javascript ">
/*writer:solidluck(西水爱大家)
QQ:45671948----UC:75853187
Version:Beta   1.0
*/
var   Browser   =   {
        /*@cc_on
        isIE   :   true,
        @*/
        isFF   :   window.navigator.appName.indexOf( "Netscape ")   !=   -1   ?   true   :   false
};
if(Browser.isIE)
{
        var   HTMLElement                 =   new   Function();
        var   HTMLDivElement           =   new   Function();
        var   HTMLUnknownElement   =   new   Function();
}
if(!Browser.isIE)
{
        function   SearchEvent()
        {
                var   func=SearchEvent.caller;
                while(func!=null)
                {
                        var   arg=func.arguments[0];
                        if(arg)
                        {
                                if(String(arg.constructor).indexOf( 'Event ')   >   -1)
                                {
                                        return   arg;
                                }