怎么设置高度为自动?

hcc_2 2004-09-27 05:39:55
我的高度不能设置为100%,我有很多文字估计高度需要500-1200,我怎么才能设置<iframe>的高度为自动调整?
...全文
826 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
dsclub 2004-09-27
  • 打赏
  • 举报
回复
仔细看孟子的回复,关键不是在这个iframe的页面而是在那个被引用的页面,在onload里写入parent.document.all.xxx.style.height=window.document.body.scrollHeight

xxx是这个iframe的id
AVAmyZ 2004-09-27
  • 打赏
  • 举报
回复
大哥,可以的啊,你不会是用错了地方了吧?<body>不是最外面的页面,而是你<iframe>的那个页面啊!呵呵
hcc_2 2004-09-27
  • 打赏
  • 举报
回复
我ID和name都用了,还是一样的,只能显示一段!
wsdzmhongm 2004-09-27
  • 打赏
  • 举报
回复
把id换为name试试

<iframe src="default.asp" scrolling="no" name=xxx frameborder="0" width="760" height="100%"></iframe>

在default.asp里设置:
<body onload="parent.document.all.xxx.style.height=window.document.body.scrollHeight">
hcc_2 2004-09-27
  • 打赏
  • 举报
回复
不行啊,还是有一大截不见了,要拖动才能看到!
孟子E章 2004-09-27
  • 打赏
  • 举报
回复
<iframe src="default.asp" scrolling="no" id=xxx frameborder="0" width="760" height="100%"></iframe>

在default.asp里设置:
<body onload="parent.document.all.xxx.style.height=window.document.body.scrollHeight">
Javascript小技巧一箩筐 事件源对象 event.srcElement.tagName event.srcElement.type 捕获释放 event.srcElement.setCapture(); event.srcElement.releaseCapture(); 事件按键 event.keyCode event.shiftKey event.altKey event.ctrlKey 事件返回值 event.returnValue 鼠标位置 event.x event.y 窗体活动元素 document.activeElement 绑定事件 document.captureEvents(Event.KEYDOWN); 访问窗体元素 document.all("txt").focus(); document.all("txt").select(); 窗体命令 document.execCommand 窗体COOKIE document.cookie 菜单事件 document.oncontextmenu 创建元素 document.createElement("SPAN"); 根据鼠标获得元素: document.elementFromPoint(event.x,event.y).tagName=="TD document.elementFromPoint(event.x,event.y).appendChild(ms) 窗体图片 document.images[索引] 窗体事件绑定 document.onmousedown=scrollwindow; 元素 document.窗体.elements[索引] 对象绑定事件 document.all.xxx.detachEvent("onclick",a); 插件数目 navigator.plugins 取变量类型 typeof($js_libpath) == "undefined" 下拉框 下拉框.options[索引] 下拉框.options.length 查找对象 document.getElementsByName("r1"); document.getElementById(id); 定时 timer=setInterval("scrollwindow()",delay); clearInterval(timer); UNCODE编码 escape() ,unescape 父对象 obj.parentElement(dhtml) obj.parentNode(dom) 交换表的行 TableID.moveRow(2,1) 替换CSS document.all.csss.href = "a.css"; 并排显示 display:inline 隐藏焦点 hidefocus=true 根据宽度换行 style="word-break:break-all" 自动刷新 简单邮件 快速转到位置 obj.scrollIntoView(true) 锚 anchors 网页传递参数 location.search(); 可编辑 obj.contenteditable=true 执行菜单命令 obj.execCommand 双字节字符 /[^x00-xff]/ 汉字 /[u4e00-u9fa5]/ 让英文字符串超出表格宽度自动换行 word-wrap: break-word; word-break: break-all; 透明背景 <IFRAME src="1.htm" width=300 height=180 allowtransparency>iframe> 获得style内容 obj.style.cssText HTML标签 document.documentElement.innerHTML 第一个style标签 document.styleSheets[0] style标签里的第一个样式 document.styleSheets[0].rules[0] 防止点击空链接时,页面往往重置到页首端。 word 上一网页源 asp: request.servervariables("HTTP_REFERER") javascript: document.referrer 释放内存 CollectGarbage(); 禁止右键 document.oncontextmenu = function() { return false;} 禁止保存 iframe src="*.htm">iframe> 地址栏图标 favicon.ico 名字最好不变16*16的16色,放虚拟目录根目录下 收藏栏图标 查看源码 关闭输入法 自动全选 ENTER键可以让光标移到下一个输入框 文本框的默认值 title换行 obj.title = "123 sdfs " 获得时间所代表的微秒 var n1 = new Date("2004-10-10".replace(/-/g, "/")).getTime() 窗口是否关闭 win.closed checkbox扁平
获取选中内容 document.selection.createRange().duplicate().text 自动完成功能 打开该功能 关闭该功能 窗口最大化 无关闭按钮IE window.open("aa.htm", "meizz", "fullscreen=7"); 统一编码/解码 alert(decodeURIComponent(encodeURIComponent("http://你好.com?as= hehe"))) encodeURIComponent对":"、"/"、";" 和 "?"也编码 表格行指示 //各种尺寸 s += " 网页可见区域宽:"+ document.body.clientWidth; s += " 网页可见区域高:"+ document.body.clientHeight; s += " 网页可见区域高:"+ document.body.offsetWeight +" (包括边线的宽)"; s += " 网页可见区域高:"+ document.body.offsetHeight +" (包括边线的宽)"; s += " 网页正文全文宽:"+ document.body.scrollWidth; s += " 网页正文全文高:"+ document.body.scrollHeight; s += " 网页被卷去的高:"+ document.body.scrollTop; s += " 网页被卷去的左:"+ document.body.scrollLeft; s += " 网页正文部分上:"+ window.screenTop; s += " 网页正文部分左:"+ window.screenLeft; s += " 屏幕分辨率的高:"+ window.screen.height; s += " 屏幕分辨率的宽:"+ window.screen.width; s += " 屏幕可用工作区高度:"+ window.screen.availHeight; s += " 屏幕可用工作区宽度:"+ window.screen.availWidth; //过滤数字 //特殊用途 设置 onclick="window.external.ShowBrowserUI("LanguageDialog", null)"> ings",null)"> //不缓存 //正则匹配匹配中文字符的正则表达式: [u4e00-u9fa5] 匹配双字节字符(包括汉字在内):[^x00-xff] 匹配空行的正则表达式: [s| ]* 匹配HTML标记的正则表达式:/<(.*)>.*|<(.*) />/ 匹配首尾空格的正则表达式:(^s*)|(s*$)(像vbscript那样的trim函数) 匹配Email地址的正则表达式:w+([-+.]w+)*@w+([-.]w+)*.w+([-.]w+)* 匹配网址URL的正则表达式:http://([w-]+.)+[w-]+(/[w- ./?%&=]*)? 以下是例子: 利用正则表达式限制网页表单里的文本框输入内容: 用正则表达式限制只能输入中文:onkeyup="value=value.replace(/[^u4E00-u9FA5]/g,"")" onbeforepaste="clipboardData.setData("text",clipboardData.getData("text").replace(/[^u4E00-u9FA5]/g,""))" 1.用正则表达式限制只能输入全角字符: onkeyup="value=value.replace(/[^uFF00-uFFFF]/g,"")" onbeforepaste="clipboardData.setData("text",clipboardData.getData("text").replace(/[^uFF00-uFFFF]/g,""))" 2.用正则表达式限制只能输入数字:onkeyup="value=value.replace(/[^d]/g,"") "onbeforepaste="clipboardData.setData("text",clipboardData.getData("text").replace(/[^d]/g,""))" 3.用正则表达式限制只能输入数字和英文:onkeyup="value=value.replace(/[W]/g,"") "onbeforepaste="clipboardData.setData("text",clipboardData.getData("text").replace(/[^d]/g,""))" //消除图像工具栏 SRC="mypicture.jpg" HEIGHT="100px" WIDTH="100px" GALLERYIMG="false"> or //无提示关闭 function Close() { var ua=navigator.userAgent var ie=navigator.appName=="Microsoft Internet Explorer"?true:false if(ie) { var IEversion=parseFloat(ua.substring(ua.indexOf("MSIE ")+5,ua.indexOf(";",ua.indexOf("MSIE ")))) if(IEversion< 5.5) { var str = "" str += ""; document.body.insertAdjacentHTML("beforeEnd", str); document.all.noTipClose.Click(); } else { window.opener =null; window.close(); } } else { window.close() } } //取得控件得绝对位置(1) <script language="javascript"> function getoffset(e) { var t=e.offsetTop; var l=e.offsetLeft; while(e=e.offsetParent) { t+=e.offsetTop; l+=e.offsetLeft; } var rec = new Array(1); rec[0] = t; rec[1] = l; return rec } ingClientRect(); oRect.left oRect. //最小化,最大化,关闭 //光标停在文字最后 <script language="javascript"> function cc() { var e = event.srcElement; var r =e.createTextRange(); r.moveStart("character",e.value.length); r.collapse(true); r.select(); } //页面进入和退出的特效 进入页面 推出页面 这个是页面被载入和调出时的一些特效。duration表示特效的持续时间,以秒为单位。transition表示使 用哪种特效,取值为1-23:   0 矩形缩小   1 矩形扩大   2 圆形缩小   3 圆形扩大   4 下到上刷新   5 上到下刷新   6 左到右刷新   7 右到左刷新   8 竖百叶窗   9 横百叶窗   10 错位横百叶窗   11 错位竖百叶窗   12 点扩散   13 左右到中间刷新   14 中间到左右刷新   15 中间到上下   16 上下到中间   17 右下到左上   18 右上到左下   19 左上到右下   20 左下到右上   21 横条   22 竖条   23 //网页是否被检索   其中属性值有以下一些:   属性值为"all": 文件将被检索,且页上链接可被查询;   属性值为"none": 文件不被检索,而且不查询页上的链接;   属性值为"index": 文件将被检索;   属性值为"follow": 查询页上的链接;   属性值为"noindex": 文件不检索,但可被查询链接;   属性值为"nofollow": //打印分页

page1

page2

//设置打印 设置 onclick="factory.printing.PageSetup()"> <script language=javascript> function window.onload() { // -- advanced features factory.printing.SetMarginMeasure(2) // measure margins in inches factory.printing.SetPageRange(false, 1, 3) // need pages from 1 to 3 factory.printing.printer = "HP DeskJet 870C" factory.printing.copies = 2 factory.printing.collate = true factory.printing.paperSize = "A4" factory.printing.paperSource = "Manual feed" // -- basic features factory.printing.header = "居左显示&b居中显示&b居右显示页码,第&p页/共&P页" factory.printing.footer = "(自定义页脚)" factory.printing.portrait = false factory.printing.leftMargin = 0.75 factory.printing.topMargin = 1.5 factory.printing.rightMargin = 0.75 factory.printing.bottomMargin = 1.5 } function Print(frame) { factory.printing.Print(true, frame) // print with prompt }
具体使用手册,更多信息,点这里 //自带的打印预览 WebBrowser.ExecWB(1,1) 打开 Web.ExecWB(2,1) 关闭现在所有的IE窗口,并打开一个新窗口 Web.ExecWB(4,1) 保存网页 Web.ExecWB(6,1) 打印 Web.ExecWB(7,1) 打印预览 Web.ExecWB(8,1) 打印页面设置 Web.ExecWB(10,1) 查看页面属性 Web.ExecWB(15,1) 好像是撤销,有待确认 Web.ExecWB(17,1) 全选 Web.ExecWB(22,1) 刷新 Web.ExecWB(45,1) 关闭窗体无提示 width=0 height=0 classid="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2">
设置 onclick=document.all.WebBrowser.ExecWB(8,1)>

//去掉打印时的页眉页脚 <script language="JavaScript"> var HKEY_Root,HKEY_Path,HKEY_Key; HKEY_Root="HKEY_CURRENT_USER"; HKEY_Path="\Software\Microsoft\Internet Explorer\PageSetup\"; //设置网页打印的页眉页脚为空 function PageSetup_Null() { try { var Wsh=new ActiveXObject("WScript.Shell"); HKEY_Key="header"; Wsh.RegWrite(HKEY_Root+HKEY_Path+HKEY_Key,""); HKEY_Key="footer"; Wsh.RegWrite(HKEY_Root+HKEY_Path+HKEY_Key,""); } catch(e){} } //设置网页打印的页眉页脚为默认值 function PageSetup_Default() { try { var Wsh=new ActiveXObject("WScript.Shell"); HKEY_Key="header"; Wsh.RegWrite(HKEY_Root+HKEY_Path+HKEY_Key,"&w&b页码,&p/&P"); HKEY_Key="footer"; Wsh.RegWrite(HKEY_Root+HKEY_Path+HKEY_Key,"&u&b&d"); } catch(e){} } Default()> //浏览器验证 function checkBrowser() { this.ver=navigator.appVersion this.dom=document.getElementById?1:0 this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom)?1:0; this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0; this.ie4=(document.all && !this.dom)?1:0; this.ns5=(this.dom && parseInt(this.ver) >= 5) ?1:0; this.ns4=(document.layers && !this.dom)?1:0; this.mac=(this.ver.indexOf("Mac") > -1) ?1:0; this.ope=(navigator.userAgent.indexOf("Opera")>-1); this.ie=(this.ie6 || this.ie5 || this.ie4) this.ns=(this.ns4 || this.ns5) this.bw=(this.ie6 || this.ie5 || this.ie4 || this.ns5 || this.ns4 || this.mac || this.ope) this.nbw=(!this.bw) return this; } //计算内容宽和高 //无模式的提示框 function modelessAlert(Msg) { window.showModelessDialog("javascript:alert(""+escape(Msg)+"");window.close();","","status:no;resizable:no;help:no;dialogHeight:height:30px;dialogHeight:40px;"); } //屏蔽按键 屏蔽鼠标右键、Ctrl+N、Shift+F10、Alt+F4、F11、F5刷新、退格键 <script language="Javascript"> //可编辑SELECT //设置光标位置 function getCaret(textbox) { var control = document.activeElement; textbox.focus(); var rang = document.selection.createRange(); rang.setEndPoint("StartToStart",textbox.createTextRange()) control.focus(); return rang.text.length; } function setCaret(textbox,pos) { try { var r =textbox.createTextRange(); r.moveStart("character",pos); r.collapse(true); r.select(); } catch(e) {} } function selectLength(textbox,start,len) { try { var r =textbox.createTextRange(); r.moveEnd("character",len-(textbox.value.length-start)); r.moveStart("character",start); r.select(); } catch(e) {//alert(e.description)} } function insertAtCaret(textbox,text) { textbox.focus(); document.selection.createRange().text = text; } //页内查找 function findInPage(str) { var txt, i, found,n = 0; if (str == "") { return false; } txt = document.body.createTextRange(); for (i = 0; i <= n && (found = txt.findText(str)) != false; i++) { txt.moveStart("character", 1); txt.moveEnd("textedit"); } if (found) { txt.moveStart("character", -1); txt.findText(str); txt.select(); txt.scrollIntoView(); n++; } else { if (n > 0) { n = 0; findInPage(str); } else { alert(str + "... 您要找的文字不存在。 请试着输入页面中的关键字再次查找!"); } } return false; } //书 http://www.itpub.net/attachment.php?s=&postid=1894598 http://www.wrclub.net/down/listdown.aspx?id=1341//操作EXECL <script language="javascript"> function jStartExcel() { var xls = new ActiveXObject ( "Excel.Application" ); xls.visible = true; var newBook = xls.Workbooks.Add; newBook.Worksheets.Add; newBook.Worksheets(1).Activate; xls.ActiveWorkBook.ActiveSheet.PageSetup.Orientation = 2; xls.ActiveWorkBook.ActiveSheet.PageSetup.PaperSize = 5; newBook.Worksheets(1).Columns("A").columnwidth=50; newBook.Worksheets(1).Columns("A").WrapText = true; newBook.Worksheets(1).Columns("B").columnwidth=50; newBook.Worksheets(1).Columns("B").WrapText = true; newBook.Worksheets(1).Range("A1:B1000").NumberFormat = "0"; newBook.Worksheets(1).Range("A1:B1000").HorizontalAlignment = -4131; newBook.Worksheets(1).Cells(1,1).Interior.ColorIndex="15"; newBook.Worksheets(1).Cells(1,1).value="First Column, First Cell"; newBook.Worksheets(1).Cells(2,1).value="First Column, Second Cell"; newBook.Worksheets(1).Cells(1,2).value="Second Column, First Cell"; newBook.Worksheets(1).Cells(2,2).value="Second Column, Second Cell"; newBook.Worksheets(1).Name="My First WorkSheet"; } tip <script Language="JavaScript"> //***********默认设置定义.********************* tPopWait=50;//停留tWait豪秒后显示提示。 tPopShow=5000;//显示tShow豪秒后关闭提示 showPopStep=20; popOpacity=99; //***************内部变量定义***************** sPop=null; curShow=null; tFadeOut=null; tFadeIn=null; tFadeWaiting=null; document.write(""); document.write("
"); function showPopupText(){ var o=event.srcElement; MouseX=event.x; MouseY=event.y; if(o.alt!=null && o.alt!=""){o.dypop=o.alt;o.alt=""}; if(o.title!=null && o.title!=""){o.dypop=o.title;o.title=""}; if(o.dypop!=sPop) { sPop=o.dypop; clearTimeout(curShow); clearTimeout(tFadeOut); clearTimeout(tFadeIn); clearTimeout(tFadeWaiting); if(sPop==null || sPop=="") { dypopLayer.innerHTML=""; dypopLayer.style.filter="Alpha()"; dypopLayer.filters.Alpha.opacity=0; } else { if(o.dyclass!=null) popStyle=o.dyclass else popStyle="cPopText"; curShow=setTimeout("showIt()",tPopWait); } } } function showIt(){ dypopLayer.className=popStyle; dypopLayer.innerHTML=sPop; popWidth=dypopLayer.clientWidth; popHeight=dypopLayer.clientHeight; if(MouseX+12+popWidth>document.body.clientWidth) popLeftAdjust=-popWidth-24 else popLeftAdjust=0; if(MouseY+12+popHeight>document.body.clientHeight) popTopAdjust=-popHeight-24 else popTopAdjust=0; dypopLayer.style.left=MouseX+12+document.body.scrollLeft+popLeftAdjust; dypopLayer.style.top=MouseY+12+document.body.scrollTop+popTopAdjust; dypopLayer.style.filter="Alpha(Opacity=0)"; fadeOut(); } function fadeOut(){ if(dypopLayer.filters.Alpha.opacitying=setTimeout("fadeIn()",tPopShow); } } function fadeIn(){ if(dypopLayer.filters.Alpha.opacity>0) { dypopLayer.filters.Alpha.opacity-=1; tFadeIn=setTimeout("fadeIn()",1); } } document.onmouseover=showPopupText; srcElement; if(oSource.tagName!="DIV") return false; var sel = document.selection; if (sel!=null) { var rng = sel.createRange(); if (rng!=null) rng.pasteHTML("插入文字"); } } //netscapte下操作xml doc = new ActiveXObject("Msxml2.DOMDocument"); doc = new ActiveXObject("Microsoft.XMLDOM") ->> doc = (new DOMParser()).parseFromString(sXML,"text/xml") //判断键值 <script language="javascript"> var ie =navigator.appName=="Microsoft Internet Explorer"?true:false; function keyDown(e) { if(!ie) { var nkey=e.which; var iekey="现在是ns浏览器"; var realkey=String.fromCharCode(e.which); } if(ie) { var iekey=event.keyCode; var nkey="现在是ie浏览器"; var realkey=String.fromCharCode(event.keyCode); if(event.keyCode==32){realkey="" 空格""} if(event.keyCode==13){realkey="" 回车""} if(event.keyCode==27){realkey="" Esc""} if(event.keyCode==16){realkey="" Shift""} if(event.keyCode==17){realkey="" Ctrl""} if(event.keyCode==18){realkey="" Alt""} } alert("ns浏览器中键值:"+nkey+" "+"ie浏览器中键值:"+iekey+" "+"实际键为"+realkey); } document.onkeydown = keyDown; //Javascript Document.

请按任意一个键。。。。

//禁止FSO 1.注销组件 regsvr32 /u scrrun.dll 2.修改PROGID HKEY_CLASSES_ROOTScripting.FileSystemObject Scripting.FileSystemObject 3.对于使用object的用户,修改HKEY_CLASSES_ROOTScripting. //省略号
就是比如有一行文字,很长,表格内一行显示不下.
//检测media play版本 //图象按比例 <script language="JavaScript"> src=".." onload = "DrawImage(this)"> //细线SELECT function getComputerName() { var objWMIService = GetObject("Winmgmts:rootcimv2"); for(e = new Enumerator(objWMIService) ; !e.atEnd() ; e.moveNext()) { var getComputer = e.item(); return getComputer.Name; } } //条件编译 <script language=javascript> /*@cc_on @*/ /*@if (@_win32 && @_jscript_version>5) function window.confirm(str) { execScript("n = msgbox(""+ str +"", 257)", "vbscript"); return(n == 1); } @end @*/ //mergeAttributes 复制所有读/写标签属性到指定元素。
This is a sample DIV element.
This is another sample DIV element.
以上内容可以随意转载,转载后请注名来源和出处! 原文链接:http://ttyp.cnblogs.com/archive/2004/11/15/63900.aspx //Import function Import() { for( var i=0; isrc="" + file + "">"); else document.write(""); } }; //js枚举 function getComputerName() { var objWMIService = GetObject("Winmgmts:rootcimv2"); for(e = new Enumerator(objWMIService) ; !e.atEnd() ; e.moveNext()) { var getComputer = e.item(); return getComputer.Name; } } //条件编译 <script language=javascript> /*@cc_on @*/ /*@if (@_win32 && @_jscript_version>5) function window.confirm(str) { execScript("n = msgbox(""+ str +"", 257)", "vbscript"); return(n == 1); } @end @*/ //mergeAttributes 复制所有读/写标签属性到指定元素。
This is a sample DIV element.
This is another sample DIV element.
电子书制作:源码爱好者
看到我的插件在pjblog这么受欢迎,实在很高兴,长期以来收到反馈最多的问题,莫过于播放器的防刷新,今天我贴上一段代码,给大家参考一下 复制内容到剪贴板 代码: <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8;"> <title>简单生活-左手一支刀,右手一支叉,把生活慢慢享受!</title> [removed] function framebutton(){         var obj = document.getElementById('navigation');         var musicobj = document.getElementById('topFrame');         var frameswitch = document.getElementById('frameswitch');         var switchbar = document.getElementById('switchbar');         if(obj.style.width == '1px'){                 obj.style.width = '200px';                 musicobj.style.width = '200px';                 switchbar.style.left = '200px';                 frameswitch.style.backgroundPosition = '0';                 frameswitch.src = 'http://www.wilf.cn/plugin/flamp3/images/btn_hide.jpg';         }else{                 obj.style.width = '1px';                 musicobj.style.width = '1px';                 switchbar.style.left = '1px';                 frameswitch.style.backgroundPosition = '-11';                 frameswitch.src = 'http://www.wilf.cn/plugin/flamp3/images/btn_show.jpg';         } } if(top != self) {         top.location = self.location; } [removed] </head> <body 100%; margin: 0; padding: 0;"  scroll="no"> width="100%" height="100%" cellspacing="0" cellpadding="0" border="0">        
100%;width: 100%;">                 width="14" height="100%" cellspacing="0" cellpadding="0" border="0" absolute; left: 1px; background-repeat: repeat-y; background-position: -200px; repeat-y left center;">                                                                                                                                                                        
border="0" src="http://www.wilf.cn/plugin/flamp3/images/btn_show.jpg" 0pt 50%;"/>
          <iframe 100%; width: 100%; " src="http://www.wilf.cn/default.html" name="mainFrame" frameborder="0" scrolling="yes"></iframe>  
</body> </html> 隐藏在侧栏中,可以开启,为什么没有集成在插件里?因为以目前pjblog的插件机制,这个不属于插件力所能及范围内。 大家如果有需要,可以把上面的代码,保存下来,修改框架链接以及图片地址便可使用。
关于日历的控/* * My97 DatePicker 4.8 Beta4 * License: http://www.my97.net/dp/license.asp */ var $dp,WdatePicker;(function(){var $={ $langList:[ {name:"en",charset:"UTF-8"}, {name:"zh-cn",charset:"gb2312"}, {name:"zh-tw",charset:"GBK"}], $skinList:[ {name:"default",charset:"gb2312"}, {name:"whyGreen",charset:"gb2312"}, {name:"blue",charset:"gb2312"}, {name:"green",charset:"gb2312"}, {name:"simple",charset:"gb2312"}, {name:"ext",charset:"gb2312"}, {name:"blueFresh",charset:"gb2312"}, {name:"twoer",charset:"gb2312"}, {name:"YcloudRed",charset:"gb2312"}], $wdate:true, $crossFrame:true, $preLoad:false, $dpPath:"", doubleCalendar:false, enableKeyboard:true, enableInputMask:true, autoUpdateOnChanged:null, weekMethod:"ISO8601", position:{}, lang:"auto", skin:"default", dateFmt:"yyyy-MM-dd", realDateFmt:"yyyy-MM-dd", realTimeFmt:"HH:mm:ss", realFullFmt:"%Date %Time", minDate:"1900-01-01 00:00:00", maxDate:"2099-12-31 23:59:59", startDate:"", alwaysUseStartDate:false, yearOffset:1911, firstDayOfWeek:0, isShowWeek:false, highLineWeekDay:true, isShowClear:true, isShowToday:true, isShowOK:true, isShowOthers:true, readOnly:false, errDealMode:0, autoPickDate:null, qsEnabled:true, autoShowQS:false, opposite:false, hmsMenuCfg:{H:[1,6],m:[5,6],s:[15,4]}, opposite:false, specialDates:null,specialDays:null,disabledDates:null,disabledDays:null,onpicking:null,onpicked:null,onclearing:null,oncleared:null,ychanging:null,ychanged:null,Mchanging:null,Mchanged:null,dchanging:null,dchanged:null,Hchanging:null,Hchanged:null,mchanging:null,mchanged:null,schanging:null,schanged:null,eCont:null,vel:null,elProp:"",errMsg:"",quickSel:[],has:{},getRealLang:function(){var _=$.$langList;for(var A=0;A<_.length;A++)if(_[A].name==this.lang)return _[A];return _[0]}};WdatePicker=U;var Y=window,T={innerHTML:""},N="document",H="documentElement",C="getElementsByTagName",V,A,S,G,c,X=navigator.appName;if(X=="Microsoft Internet Explorer")S=true;else if(X=="Opera")c=true;else G=true;A=$.$dpPath||J();if($.$wdate)K(A+"skin/WdatePicker.css");V=Y;if($.$crossFrame){try{while(V.parent!=V&&V.parent[N][C]("frameset").length==0)V=V.parent}catch(O){}}if(!V.$dp)V.$dp={ff:G,ie:S,opera:c,status:0,defMinDate:$.minDate,defMaxDate:$.maxDate};B();if($.$preLoad&&$dp.status==0)E(Y,"onload",function(){U(null,true)});if(!Y[N].docMD){E(Y[N],"onmousedown",D,true);Y[N].docMD=true}if(!V[N].docMD){E(V[N],"onmousedown",D,true);V[N].docMD=true}E(Y,"onunload",function(){if($dp.dd)P($dp.dd,"none")});function B(){try{V[N],V.$dp=V.$dp||{}}catch($){V=Y;$dp=$dp||{}}var A={win:Y,$:function($){return(typeof $=="string")?Y[N].getElementById($):$},$D:function($,_){return this.$DV(this.$($).value,_)},$DV:function(_,$){if(_!=""){this.dt=$dp.cal.splitDate(_,$dp.cal.dateFmt);if($)for(var B in $)if(this.dt[B]===undefined)this.errMsg="invalid property:"+B;else{this.dt[B]+=$[B];if(B=="M"){var C=$["M"]>0?1:0,A=new Date(this.dt["y"],this.dt["M"],0).getDate();this.dt["d"]=Math.min(A+C,this.dt["d"])}}if(this.dt.refresh())return this.dt}return""},show:function(){var A=V[N].getElementsByTagName("div"),$=100000;for(var B=0;B$)$=_}this.dd.style.zIndex=$+2;P(this.dd,"block");P(this.dd.firstChild,"")},unbind:function($){$=this.$($);if($.initcfg){L($,"onclick",function(){U($.initcfg)});L($,"onfocus",function(){U($.initcfg)})}},hide:function(){P(this.dd,"none")},attachEvent:E};for(var _ in A)V.$dp[_]=A[_];$dp=V.$dp}function E(B,_,A,$){if(B.addEventListener){var C=_.replace(/on/,"");A._ieEmuEventHandler=function($){return A($)};B.addEventListener(C,A._ieEmuEventHandler,$)}else B.attachEvent(_,A)}function L(A,$,_){if(A.removeEventListener){var B=$.replace(/on/,"");_._ieEmuEventHandler=function($){return _($)};A.removeEventListener(B,_._ieEmuEventHandler,false)}else A.detachEvent($,_)}function a(_,$,A){if(typeof _!=typeof $)return false;if(typeof _=="object"){if(!A)for(var B in _){if(typeof $[B]=="undefined")return false;if(!a(_[B],$[B],true))return false}return true}else if(typeof _=="function"&&typeof $=="function")return _.toString()==$.toString();else return _==$}function J(){var _,A,$=Y[N][C]("script");for(var B=0;B<$.length;B++){_=$[B].getAttribute("src")||"";_=_.substr(0,_.toLowerCase().indexOf("wdatepicker.js"));A=_.lastIndexOf("/");if(A>0)_=_.substring(0,A+1);if(_)break}return _}function K(A,$,B){var D=Y[N][C]("HEAD").item(0),_=Y[N].createElement("link");if(D){_.href=A;_.rel="stylesheet";_.type="text/css";if($)_.title=$;if(B)_.charset=B;D.appendChild(_)}}function F($){$=$||V;var A=0,_=0;while($!=V){var D=$.parent[N][C]("iframe");for(var F=0;FingClientRect)return G.getBoundingClientRect();else{var A={ROOT_TAG:/^body|html$/i,OP_SCROLL:/^(?:inline|table-row)$/i},E=false,I=null,_=G.offsetTop,H=G.offsetLeft,D=G.offsetWidth,B=G.offsetHeight,C=G.offsetParent;if(C!=G)while(C){H+=C.offsetLeft;_+=C.offsetTop;if(R(C,"position").toLowerCase()=="fixed")E=true;else if(C.tagName.toLowerCase()=="body")I=C.ownerDocument.defaultView;C=C.offsetParent}C=G.parentNode;while(C.tagName&&!A.ROOT_TAG.test(C.tagName)){if(C.scrollTop||C.scrollLeft)if(!A.OP_SCROLL.test(P(C)))if(!c||C.style.overflow!=="visible"){H-=C.scrollLeft;_-=C.scrollTop}C=C.parentNode}if(!E){var $=b(I);H-=$.left;_-=$.top}D+=H;B+=_;return{"left":H,"top":_,"right":D,"bottom":B}}}function M($){$=$||V;var B=$[N],A=($.innerWidth)?$.innerWidth:(B[H]&&B[H].clientWidth)?B[H].clientWidth:B.body.offsetWidth,_=($.innerHeight)?$.innerHeight:(B[H]&&B[H].clientHeight)?B[H].clientHeight:B.body.offsetHeight;return{"width":A,"height":_}}function b($){$=$||V;var B=$[N],A=B[H],_=B.body;B=(A&&A.scrollTop!=null&&(A.scrollTop>_.scrollTop||A.scrollLeft>_.scrollLeft))?A:_;return{"top":B.scrollTop,"left":B.scrollLeft}}function D($){try{var _=$?($.srcElement||$.target):null;if($dp.cal&&!$dp.eCont&&$dp.dd&&_!=$dp.el&&$dp.dd.style.display=="block")$dp.cal.close()}catch($){}}function Z(){$dp.status=2}var Q,_;function U(K,C){if(!$dp)return;B();var L={};for(var H in K)L[H]=K[H];for(H in $)if(H.substring(0,1)!="$"&&L[H]===undefined)L[H]=$[H];if(C){if(!J()){_=_||setInterval(function(){if(V[N].readyState=="complete")clearInterval(_);U(null,true)},50);return}if($dp.status==0){$dp.status=1;L.el=T;I(L,true)}else return}else if(L.eCont){L.eCont=$dp.$(L.eCont);L.el=T;L.autoPickDate=true;L.qsEnabled=false;I(L)}else{if($.$preLoad&&$dp.status!=2)return;var F=D();if(Y.event===F||F){L.srcEl=F.srcElement||F.target;F.cancelBubble=true}L.el=L.el=$dp.$(L.el||L.srcEl);if(!L.el||L.el["My97Mark"]===true||L.el.disabled||($dp.dd&&P($dp.dd)!="none"&&$dp.dd.style.left!="-970px")){try{if(L.el["My97Mark"])L.el["My97Mark"]=false}catch(A){}return}if(F&&L.el.nodeType==1&&!a(L.el.initcfg,K)){$dp.unbind(L.el);E(L.el,F.type=="focus"?"onclick":"onfocus",function(){U(K)});L.el.initcfg=K}I(L)}function J(){if(S&&V!=Y&&V[N].readyState!="complete")return false;return true}function D(){if(G){func=D.caller;while(func!=null){var $=func.arguments[0];if($&&($+"").indexOf("Event")>=0)return $;func=func.caller}return null}return event}}function R(_,$){return _.currentStyle?_.currentStyle[$]:document.defaultView.getComputedStyle(_,false)[$]}function P(_,$){if(_)if($!=null)_.style.display=$;else return R(_,"display")}function I(G,_){var D=G.el?G.el.nodeName:"INPUT";if(_||G.eCont||new RegExp(/input|textarea|div|span|p|a/ig).test(D))G.elProp=D=="INPUT"?"value":"innerHTML";else return;if(G.lang=="auto")G.lang=S?navigator.browserLanguage.toLowerCase():navigator.language.toLowerCase();if(!G.eCont)for(var C in G)$dp[C]=G[C];if(!$dp.dd||G.eCont||($dp.dd&&(G.getRealLang().name!=$dp.dd.lang||G.skin!=$dp.dd.skin))){if(G.eCont)E(G.eCont,G);else{$dp.dd=V[N].createElement("DIV");$dp.dd.style.cssText="position:absolute";V[N].body.appendChild($dp.dd);E($dp.dd,G);if(_)$dp.dd.style.left=$dp.dd.style.top="-970px";else{$dp.show();B($dp)}}}else if($dp.cal){$dp.show();$dp.cal.init();if(!$dp.eCont)B($dp)}function E(K,J){var I=V[N].domain,F=false,G="<iframe hideFocus=true width=9 height=7 frameborder=0 border=0 scrolling=no src=\"about:blank\">iframe>";K.innerHTML=G;var _=$.$langList,D=$.$skinList,H;try{H=K.lastChild.contentWindow[N]}catch(E){F=true;K.removeChild(K.lastChild);var L=V[N].createElement("iframe");L.hideFocus=true;L.frameBorder=0;L.scrolling="no";L.src="javascript:(function(){var d=document;d.open();d.domain='"+I+"';})()";K.appendChild(L);setTimeout(function(){H=K.lastChild.contentWindow[N];C()},97);return}C();function C(){var _=J.getRealLang();K.lang=_.name;K.skin=J.skin;var $=["<script>","","var doc=document, $d, $dp, $cfg=doc.cfg, $pdp = parent.$dp, $dt, $tdt, $sdt, $lastInput, $IE=$pdp.ie, $FF = $pdp.ff,$OPERA=$pdp.opera, $ny, $cMark = false;","if($cfg.eCont){$dp = {};for(var p in $pdp)$dp[p]=$pdp[p];}else{$dp=$pdp;};for(var p in $cfg){$dp[p]=$cfg[p];}","doc.oncontextmenu=function(){try{$c._fillQS(!$dp.has.d,1);showB($d.qsDivSel);}catch(e){};return false;};","src=",A,"lang/",_.name,".js charset=",_.charset,">");$.push("<script src=\""+A+"calendar.js\">");$.push("<script>var t;t=t||setInterval(function(){if(doc.ready){new My97DP();$cfg.onload();$c.autoSize();$cfg.setPos($dp);clearInterval(t);}},20);");H.cfg=J;H.write($.join(""));H.close()}}function B(J){var H=J.position.left,C=J.position.top,D=J.el;if(D==T)return;if(D!=J.srcEl&&(P(D)=="none"||D.type=="hidden"))D=J.srcEl;var I=W(D),$=F(Y),E=M(V),B=b(V),G=$dp.dd.offsetHeight,A=$dp.dd.offsetWidth;if(isNaN(C))C=0;if(($.topM+I.bottom+G>E.height)&&($.topM+I.top-G>0))C+=B.top+$.topM+I.top-G-2;else{C+=B.top+$.topM+I.bottom;var _=C-B.top+G-E.height;if(_>0)C-=_}if(isNaN(H))H=0;H+=B.left+Math.min($.leftM+I.left,E.width-A-5)-(S?2:0);J.dd.style.top=C+"px";J.dd.style.left=H+"px"}}})()件

61,110

社区成员

发帖
与我相关
我的任务
社区描述
层叠样式表(英文全称:Cascading Style Sheets)是一种用来表现HTML(标准通用标记语言的一个应用)或XML(标准通用标记语言的一个子集)等文件样式的计算机语言。
社区管理员
  • HTML(CSS)社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧