js判断ueditor内容是否为空
2个回答
展开全部
<div><span class="intro">下载进度:</span> <div class="barborder"> <div class="bar" id="loadpercent"></div> </div> </div> 定义广告层:
复制代码 代码如下:
<div id="showAD"></div> 定义FLASH显示层: <div id="showSWF" class="show" style="display:none;"> <object id="flashgame" ......省略内容......> </object> </div>
js代码:
复制代码 代码如下:
<script language="javascript"> if(window.navigator.userAgent.indexOf("Firefox")>=1)//判断是否为FIREFOX浏览器,FIREFOX不支持PercentLoaded()函数 { document.getElementById("loadpercent").innerHTML= "Firefox!No Attentions"; document.getElementById("showSWF").style.display='block'; } else { refreshProgress(); } function show()//隐藏AD层、显示FLASH层 { document.getElementById("showAD").style.display='none'; document.getElementById("showSWF").style.display='block'; } function refreshProgress()//刷新进度条函数 { var downProgressWidth=502; var bar = document.getElementById("loadpercent"); var movie = document.getElementById("flashgame"); var nPercentLoaded = Math.abs(movie.PercentLoaded()); bar.style.width=Math.ceil(downProgressWidth*nPercentLoaded/100) +"px"; bar.innerHTML= nPercentLoaded +"%"; if(nPercentLoaded==100) { bar.style.width=(downProgressWidth-2) + "px"; bar.innerHTML= "Game download is complete"; show(); } else { setTimeout('refreshProgress()',0); } }
复制代码 代码如下:
<div id="showAD"></div> 定义FLASH显示层: <div id="showSWF" class="show" style="display:none;"> <object id="flashgame" ......省略内容......> </object> </div>
js代码:
复制代码 代码如下:
<script language="javascript"> if(window.navigator.userAgent.indexOf("Firefox")>=1)//判断是否为FIREFOX浏览器,FIREFOX不支持PercentLoaded()函数 { document.getElementById("loadpercent").innerHTML= "Firefox!No Attentions"; document.getElementById("showSWF").style.display='block'; } else { refreshProgress(); } function show()//隐藏AD层、显示FLASH层 { document.getElementById("showAD").style.display='none'; document.getElementById("showSWF").style.display='block'; } function refreshProgress()//刷新进度条函数 { var downProgressWidth=502; var bar = document.getElementById("loadpercent"); var movie = document.getElementById("flashgame"); var nPercentLoaded = Math.abs(movie.PercentLoaded()); bar.style.width=Math.ceil(downProgressWidth*nPercentLoaded/100) +"px"; bar.innerHTML= nPercentLoaded +"%"; if(nPercentLoaded==100) { bar.style.width=(downProgressWidth-2) + "px"; bar.innerHTML= "Game download is complete"; show(); } else { setTimeout('refreshProgress()',0); } }
本回答被提问者和网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询