知识大全 asp.net 中实现窗体两边的浮动条
Posted 知
篇首语:人老心不老,身穷志不穷。本文由小常识网(cha138.com)小编为大家整理,主要介绍了知识大全 asp.net 中实现窗体两边的浮动条相关的知识,希望对你有一定的参考价值。
javascript
第一个 <SCRIPT src= js/show js ></SCRIPT>
show js代码如下
/*** * 对联广告代码 DI (Double Images)
* by Moky @ / / */ DI_sLeftImageUrl = _ / / jpg DI_sRightImageUrl = _ / / jpg DI_sClickUrl = DI_sImageUrl = DI_iImageWidth = parseInt( ) if (isNaN(DI_iImageWidth)) DI_iImageWidth = DI_iImageHeight = parseInt( ) if (isNaN(DI_iImageHeight)) DI_iImageHeight =
DI_iMinWindowWidth = + DI_iImageWidth * /* avoid covering the web content */ DI_iTop = DI_iLeft = DI_iRight = DI_iTimeout =
DI_blClosed = false /*—— mon codes begin ——*/ var __bs__ = navigator userAgent indexOf( MSIE ) > ?
MSIE navigator userAgent indexOf( Safari ) > ?
Safari others var __dt__ = (document documentElement clientHeight > ) &&(__bs__ == MSIE || document body clientHeight > document documentElement clientHeight) ?
W C undefined function MK_pageY() if (__bs__ == MSIE ) if (__dt__ == W C )
return document documentElement scrollTop else return document body scrollTop else return window pageYOffset function MK_pageX() if (__bs__ == MSIE ) if (__dt__ == W C )
return document documentElement scrollLeft else return document body scrollLeft else return window pageXOffset function MK_pageH() if (__bs__ == Safari )
return window innerHeight else if (__dt__ == W C )
return document documentElement clientHeight else return document body clientHeight function MK_pageW() if (__bs__ == Safari )
return window innerWidth else if (__dt__ == W C )
return document documentElement clientWidth else return document body clientWidth function MK_posY(o v) if (!o || !o style) return if (v) o style top = parseInt(v) + px else return o style top function MK_posX(o v) if (!o || !o style) return if (v) o style left = parseInt(v) + px else return o style left
function MK_makeAdFodderHTML(sImageUrl sImageName iWidth iHeight) var _src = sImageUrl == ? sImageName sImageUrl return (!_src match(/\\ swf$/gi)? <img src= $src$ height= width= border= /> <object classid= clsid D CDB E AE D cf B + codebase= #version= + height= width= >\\n + <param name= movie value= $src$ />\\n + <param name= quality value= high />\\n + <param name= wmode value= opaque />\\n + <embed height= width= + src= $src$ quality= high wmode= opaque + type= application/x shockwave flash pluginspace= > + </embed> + </object> ) replace(/\\$src\\$/gi _src) replace(/\\$height\\$/gi iHeight) replace(/\\$width\\$/gi iWidth) /*—— mon codes end ——*/ function closead() DI_blClosed = true DI_Hide()
function DI_Hide() try document getElementById( DI_LDiv ) style display = none document getElementById( DI_RDiv ) style display = none catch(e)
function JsCloseDAD() closead() return false
function DI_Show() if (DI_blClosed) return try document getElementById( DI_LDiv ) style display = block document getElementById( DI_RDiv ) style display = block catch(e)
function DI_Load() var style_class /* try if (__bs__ == MSIE )
document styleSheets[ ] addRule( div_floating_ad position absolute ) else document styleSheets[ ] insertRule( div_floating_ad position absolute document styleSheets[ ] cssRules length) style_class = class= div_floating_ad catch(e) */ style_class = /* */ var _temp = <div id= $div_id$ + style_class + >\\n + <div ><a $js_ad_click$ target= _blank >$js_ad_content$</a></div>\\n + <div ><img src= _ / / gif onClick= javascript JsCloseDAD() ></div>\\n + </div>\\n var _lcon = MK_makeAdFodderHTML(DI_sImageUrl DI_sLeftImageUrl DI_iImageWidth DI_iImageHeight) var _rcon = MK_makeAdFodderHTML(DI_sImageUrl DI_sRightImageUrl DI_iImageWidth DI_iImageHeight) var _lstr = _temp replace(/\\$js_ad_click\\$/gi DI_sClickUrl) replace(/\\$div_id\\$/gi DI_LDiv ) replace(/\\$js_ad_content\\$/gi _lcon) _lstr += left + _temp var _rstr = _temp replace(/\\$js_ad_click\\$/gi DI_sClickUrl) replace(/\\$div_id\\$/gi DI_RDiv ) replace(/\\$js_ad_content\\$/gi _rcon) _rstr += right + _temp document writeln(_lstr) document writeln(_rstr) setInterval( DI_Move() DI_iTimeout)
function DI_Move() if(MK_pageW() < DI_iMinWindowWidth) DI_Hide() return DI_Show() try var ldiv = document getElementById( DI_LDiv ) MK_posY(ldiv DI_iTop) MK_posX(ldiv DI_iLeft) var rdiv = document getElementById( DI_RDiv ) MK_posY(rdiv DI_iTop) MK_posX(rdiv MK_pageX() + MK_pageW() DI_iImageWidth DI_iRight) catch(e) /* start */ DI_Load() document write( <img src= width= height= /> )
第二个
<SCRIPT src= js/show js ></SCRIPT>
/*** * 左边贴底浮动广告代码 LBM (Left Bottom Move)
* Created by Moky @ / / */ LBM_sLeftImageUrl = _ / / jpg LBM_sRightImageUrl = _ / / jpg LBM_sClickUrl = LBM_sImageUrl = LBM_iImageWidth = parseInt( ) if (isNaN(LBM_iImageWidth)) LBM_iImageWidth = LBM_iImageHeight = parseInt( ) if (isNaN(LBM_iImageHeight)) LBM_iImageHeight =
LBM_iLeft = LBM_iRight = LBM_iBottom = LBM_iMinTop = /* avoid conflicts with double images */ LBM_iTimeout = /*—— mon codes begin ——*/ var __bs__ = navigator userAgent indexOf( MSIE ) > ?
MSIE navigator userAgent indexOf( Safari ) > ?
Safari others var __dt__ = (document documentElement clientHeight > ) &&(__bs__ == MSIE || document body clientHeight > document documentElement clientHeight) ?
W C undefined function MK_pageY() if (__bs__ == MSIE ) if (__dt__ == W C )
return document documentElement scrollTop else return document body scrollTop else return window pageYOffset function MK_pageX() if (__bs__ == MSIE ) if (__dt__ == W C )
return document documentElement scrollLeft else return document body scrollLeft else return window pageXOffset function MK_pageH() if (__bs__ == Safari )
return window innerHeight else if (__dt__ == W C )
return document documentElement clientHeight else return document body clientHeight function MK_pageW() if (__bs__ == Safari )
return window innerWidth else if (__dt__ == W C )
return document documentElement clientWidth else return document body clientWidth function MK_posY(o v) if (!o || !o style) return if (v) o style top = parseInt(v) + px else return o style top function MK_posX(o v) if (!o || !o style) return if (v) o style left = parseInt(v) + px else return o style left
function MK_makeAdFodderHTML(sImageUrl sImageName iWidth iHeight) var _src = sImageUrl == ? sImageName sImageUrl return (!_src match(/\\ swf$/gi)? <img src= $src$ height= width= border= /> <object classid= clsid D CDB E AE D cf B + codebase= #version= + height= width= >\\n + <param name= movie value= $src$ />\\n + <param name= quality value= high />\\n + <param name= wmode value= opaque />\\n + <embed height= width= + src= $src$ quality= high wmode= opaque + type= application/x shockwave flash pluginspace= > + </embed> + </object> ) replace(/\\$src\\$/gi _src) replace(/\\$height\\$/gi iHeight) replace(/\\$width\\$/gi iWidth) function atoi(s) var r = parseInt(s) return isNaN(r) ? r function magic_locus(x x n) x = atoi(x ) x = atoi(x ) n = atoi(n) var d = Math abs(x x ) if (d < n) return magic_locus(x x d / ) return n <= ? x (x + (n ) * x ) / n /*—— mon codes end ——*/ function LBM_Load() var style_class /* try if (__bs__ == MSIE )
document styleSheets[ ] addRule( div_floating_ad position absolute ) else document styleSheets[ ] insertRule( div_floating_ad position absolute document styleSheets[ ] cssRules length) style_class = class= div_floating_ad catch(e) */ style_class = /* */ var _ltemp = <div id= LBM_LDiv + style_class + > + <a $js_ad_click$ target= _blank >$js_ad_content$</a> + </div> var _lcon = MK_makeAdFodderHTML(LBM_sImageUrl LBM_sLeftImageUrl LBM_iImageWidth LBM_iImageHeight) var _lstr = _ltemp replace(/\\$js_ad_click\\$/gi LBM_sClickUrl) replace(/\\$js_ad_content\\$/gi _lcon) document writeln(_lstr) var _rtemp = <div id= LBM_RDiv + style_class + > + <a $js_ad_click$ target= _blank >$js_ad_content$</a> + </div> var _rcon = MK_makeAdFodderHTML(LBM_sImageUrl LBM_sRightImageUrl LBM_iImageWidth LBM_iImageHeight) var _rstr = _rtemp replace(/\\$js_ad_click\\$/gi LBM_sClickUrl) replace(/\\$js_ad_content\\$/gi _rcon) document writeln(_rstr) setInterval( LBM_Move() LBM_iTimeout)
function LBM_Move() var _top = try var _ldiv = document getElementById( LBM_LDiv )
var _left = MK_pageX() + LBM_iLeft _top = MK_pageY() + MK_pageH() LBM_iBottom LBM_iImageHeight /*—— magic locus begin add by moky @ / / ——*/ _top = magic_locus(_top MK_posY(_ldiv) ) var max_y = MK_pageY() + MK_pageH() if (_top > max_y) _top = max_y /*—— magic locus end add by moky @ / / ——*/ if (_top < LBM_iMinTop) _top = LBM_iMinTop
MK_posY(_ldiv _top) MK_posX(_ldiv _left) catch(e)
try var _rdiv = document getElementById( LBM_RDiv )
var _right = MK_pageX() + MK_pageW() LBM_iImageWidth LBM_iRight
var max_y = MK_pageY() + MK_pageH() if (_top > max_y) _top = max_y /*—— magic locus end add by moky @ / / ——*/ if (_top < LBM_iMinTop) _top = LBM_iMinTop
cha138/Article/program/net/201311/12298相关参考
ASP.NET窗体对话框的实现 以下文字资料是由(全榜网网www.cha138.com)小编为大家搜集整理后发布的内容,让我们赶快一起来看一下吧! 窗体对话框组件与微
ASP.NET窗体间传值实现方法 以下文字资料是由(全榜网网www.cha138.com)小编为大家搜集整理后发布的内容,让我们赶快一起来看一下吧! 假设Parent
ASP.NET窗体间传值的方法 以下文字资料是由(全榜网网www.cha138.com)小编为大家搜集整理后发布的内容,让我们赶快一起来看一下吧!这篇文章介绍了ASPN
ASP.NET可交互式位图窗体设计(下) 以下文字资料是由(全榜网网www.cha138.com)小编为大家搜集整理后发布的内容,让我们赶快一起来看一下吧! 维护两个
知识大全 使用反射将业务对象绑定到 ASP.NET 窗体控件
使用反射将业务对象绑定到ASP.NET窗体控件 以下文字资料是由(全榜网网www.cha138.com)小编为大家搜集整理后发布的内容,让我们赶快一起来看一下吧! 引
知识大全 结合JavaScript与ASP.NET Web窗体进行程序开发
结合JavaScript与ASP.NETWeb窗体进行程序开发 以下文字资料是由(全榜网网www.cha138.com)小编为大家搜集整理后发布的内容,让我们赶快一起来
在ASP.NET中显示进度条 以下文字资料是由(全榜网网www.cha138.com)小编为大家搜集整理后发布的内容,让我们赶快一起来看一下吧! 对于加载时间比较长的
ASP.Net:基于窗体的身份验证 以下文字资料是由(全榜网网www.cha138.com)小编为大家搜集整理后发布的内容,让我们赶快一起来看一下吧! 基于窗体的验证
一个ASP.NET的进度条 以下文字资料是由(全榜网网www.cha138.com)小编为大家搜集整理后发布的内容,让我们赶快一起来看一下吧! 创建进度条 &l
ASP.NET实现进度条 以下文字资料是由(全榜网网www.cha138.com)小编为大家搜集整理后发布的内容,让我们赶快一起来看一下吧! 终于找到一个ASPNET