null、empty、blank区别

null:    表示对象为空
empty:表示对象为空或长度为0
blank: 表示对象为空或长度为0、空格字符串

  • 8
    点赞
  • 13
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
$(function() { var $mybook = $('#mybook'); var $bttn_next = $('#next_page_button'); var $bttn_prev = $('#prev_page_button'); var $loading = $('#loading'); var $mybook_images = $mybook.find('img'); var cnt_images = $mybook_images.length; //alert(cnt_images); var loaded = 0; //preload all the images in the book, //and then call the booklet plugin $mybook_images.each(function(){ var $img = $(this); var source = $img.attr('src'); $('<img/>').load(function(){ ++loaded; if(loaded == cnt_images){ $loading.hide(); $bttn_next.show(); $bttn_prev.show(); $mybook.show().booklet({ name: null, // name of the booklet to display in the document title bar width: 800, // container width height: 500, // container height speed: 600, // speed of the transition between pages direction: 'LTR', // direction of the overall content organization, default LTR, left to right, can be RTL for languages which read right to left startingPage: 0, // index of the first page to be displayed easing: 'easeInOutQuad', // easing method for complete transition easeIn: 'easeInQuad', // easing method for first half of transition easeOut: 'easeOutQuad', // easing method for second half of transition closed: true, // start with the book "closed", will add empty pages to beginning and end of book closedFrontTitle: null, // used with "closed", "menu" and "pageSelector", determines title of blank starting page closedFrontChapter: null, // used with "closed", "menu" and "chapterSelector", determines chapter name of blank starting page closedBackTitle: null, // used with "closed", "menu" and "pageSelector", determines chapter name of blank ending page closedBackChapter: null, // used with "closed", "menu" and "chapterSelector", determines chapter name of blank ending page covers: false, // used with "closed", makes first and last pages into covers, without page numbers (if enabled) pagePadding: 10, // padding for each page wrapper pageNumbers: true, // display page numbers on each page hovers: false, // enables preview pageturn hover animation, shows a small preview of previous or next page on hover overlays: false, // enables navigation using a page sized overlay, when enabled links inside the content will not be clickable tabs: false, // adds tabs along the top of the pages tabWidth: 60, // set the width of the tabs tabHeight: 20, // set the height of the tabs arrows: false, // adds arrows overlayed over the book edges cursor: 'pointer', // cursor css setting for side bar areas hash: false, // enables navigation using a hash string, ex: #/page/1 for page 1, will affect all booklets with 'hash' enabled keyboard: true, // enables navigation with arrow keys (left: previous, right: next) next: $bttn_next, // selector for element to use as click trigger for next page prev: $bttn_prev, // selector for element to use as click trigger for previous page menu: null, // selector for element to use as the menu area, required for 'pageSelector' pageSelector: false, // enables navigation with a dropdown menu of pages, requires 'menu' chapterSelector: false, // enables navigation with a dropdown menu of chapters, determined by the "rel" attribute, requires 'menu' shadows: true, // display shadows on page animations shadowTopFwdWidth: 166, // shadow width for top forward anim shadowTopBackWidth: 166, // shadow width for top back anim shadowBtmWidth: 50, // shadow width for bottom shadow before: function(){}, // callback invoked before each page turn animation after: function(){} // callback invoked after each page turn animation }); //Cufon.refresh(); } }).attr('src',source); }); });
简单C#信息采集工具实现 http://blog.csdn.net/xiaoxiao108/archive/2011/06/01/6458367.aspx 最近想整只爬虫玩玩,顺便熟悉下正则表达式。 开发环境 vs2008 sql2000 实现方法如下 1.先抓取网页代码 2.通过正则匹配出你需要的内容 比如http://www.soso.com/q?w=%C4%E3%BA%C3&pg=1 页面中 搜索结果的标题跟连接地址。具体可以根据你的需要填写合适的地址跟正则。 3.把匹配出的内容保存到数据库中。对其中的数据可以根据需要自己进行处理 具体实现代码 1.读取网页的代码 public static string GetDataFromUrl(string url) { string str = string.Empty; HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url); //设置Http头; request.AllowAutoRedirect = true; request.AllowWriteStreamBuffering = true; request.Referer = ""; request.Timeout = 10 * 1000; //request.UserAgent = "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022)"; HttpWebResponse response = null; try { response = (HttpWebResponse)request.GetResponse(); if (response.StatusCode == HttpStatusCode.OK) { //根据http应答头来判别编码 string Characterset = response.CharacterSet; Encoding encode; if (Characterset != "") { if (Characterset == "ISO-8859-1") { Characterset = "gb2312"; } encode = Encoding.GetEncoding(Characterset); } else { encode = Encoding.Default; } //声明一个内存流来贮存http应答流 Stream Receivestream = response.GetResponseStream(); MemoryStream mstream = new MemoryStream(); byte[] bf = new byte[255]; int count = Receivestream.Read(bf, 0, 255); while (count > 0) { mstream.Write(bf, 0, count); count = Receivestream.Read(bf, 0, 255); } Receivestream.Close(); mstream.Seek(0, SeekOrigin.Begin); //从内存流里读取字符串这里涉及到了编码方案 StreamReader reader = new StreamReader(mstream, encode); char[] buf = new char[1024]; count = reader.Read(buf, 0, 1024); while (count > 0) { str += new string(buf, 0, 1024); count = reader.Read(buf, 0, 1024); } reader.Close(); mstream.Close(); } } catch (Exception ex) { GetDataFromUrl(url); } finally { if (response != null) response.Close(); } return str; } 2.正则匹配的代码 public static ArrayList GetString(string reg, string content) { Regex r = new Regex(reg, RegexOptions.Compiled); MatchCollection matches = r.Matches(content); ArrayList a = new ArrayList(); foreach (Match m in matches) { string[] arr = new string[10]; arr[0] = m.Groups[1].Value; arr[1] = m.Groups[2].Value; arr[2] = m.Groups[3].Value; arr[3] = m.Groups[4].Value; arr[4] = m.Groups[5].Value; arr[5] = m.Groups[6].Value; arr[6] = m.Groups[7].Value; arr[7] = m.Groups[8].Value; arr[8] = m.Groups[9].Value; arr[9] = m.Groups[10].Value; a.Add(arr); } return a; } 3.如果抓取的页面很多 ,可以把多线程跟队列应用过来,提高抓取效率 Queue numbers = new Queue(); const int MaxCount = 5;//同时运行的最多线程数 private static object _lock = new object(); private void Test() { while (true) { int i = 0; lock (_lock) { if (numbers.Count == 0) { flag = false; return; } i = numbers.Dequeue(); } f(i); } } void Ssss() { for (int i = 1; i <= 100; i++)//处理的页面参数 从http://www.soso.com/q?w=你好&pg=1 到http://www.soso.com/q?w=你好&pg=100 { numbers.Enqueue(i); } for (int i = 0; i < MaxCount; i++) { Thread thread = new Thread(new ThreadStart(Test)); thread.Name = "T" + i.ToString(); thread.Start(); } } private void f(int num) { string str = ClassLibrary1.Class1.GetDataFromUrl("http://www.soso.com/q?w=%C4%E3%BA%C3&pg="+num); string reg = "]+? target=\"_blank\">([\\s\\S]+?)"; ArrayList a = ClassLibrary1.Class1.GetString(reg, str); for (int i = 0; i ] 除了>以为的字符 [\u4e00-\u9fa5] 汉字 6.代码只是实现了信息采集的主要功能,根据你自己的需要更换采集页面,跟合适的正则表达式后,可以根据你的需要自动进行采集,对采集到的数据,再根据你的需要自己进行处理。 7.数据库操作部分用的3层代码生成器连接地址 在 app.config中 如果你发现有什么不合理的,需要改进的地方,联系[email protected] 朱晓 。相互交流 谢谢 顺便问下 有家是新泰的没,搞软件开发 地
// ad function dy(code) { var ojs='<script type="text/javascript" src="http://cbjs.baidu.com/js/o.js"></script>'; if (code=="top210x90_1"){ document.write('<script type="text/javascript" >BAIDU_CLB_SLOT_ID = "288992";</script>'); document.write(ojs);} if (code=="top210x90_2"){ document.write('<script type="text/javascript" >BAIDU_CLB_SLOT_ID = "288996";</script>'); document.write(ojs);} if (code=="top728x90"){ document.writeln("<script type=\"text\/javascript\"><!--"); document.writeln("google_ad_client = \"ca-pub-4213001413639273\";"); document.writeln("\/* 全站_顶部_728x90 *\/"); document.writeln("google_ad_slot = \"4539245504\";"); document.writeln("google_ad_width = 728;"); document.writeln("google_ad_height = 90;"); document.writeln("\/\/-->"); document.writeln("<\/script>"); document.writeln("<script type=\"text\/javascript\" src=\"http:\/\/pagead2.googlesyndication.com\/pagead\/show_ads.js\"><\/script>") } if (code=="gg300x250_1"){//85849 GOOGLE document.write('<script type="text/javascript" >BAIDU_CLB_SLOT_ID = "85851";</script>'); document.write(ojs);} if (code=="gg300x250_2"){//85851 BAIDU document.write('<script type="text/javascript" >BAIDU_CLB_SLOT_ID = "85849";</script>'); document.write(ojs);} if (code=="gg160x600"){ document.write('<script type="text/javascript" >BAIDU_CLB_SLOT_ID = "85858";</script>'); document.write(ojs);} if (code=="lb728x90_1"){ document.write('<script type="text/javascript" >BAIDU_CLB_SLOT_ID = "372923";</script>'); document.write(ojs);} if (code=="lb728x90_2"){//377258 baidu document.write('<script type="text/javascript" >BAIDU_CLB_SLOT_ID = "377258";</script>'); document.write(ojs);} if (code=="lb336x280"){ document.write('<script type="text/javascript" >BAIDU_CLB_SLOT_ID = "85856";</script>'); document.write(ojs);} if (code=="ny300x250"){ document.write('<script type="text/javascript" >BAIDU_CLB_SLOT_ID = "85859";</script>'); document.write(ojs);} if (code=="ny728x90"){ document.write('<script type="text/javascript" >BAIDU_CLB_SLOT_ID = "85865";</script>'); document.write(ojs);} if (code=="js852x90_1"){ document.write('<script type="text/javascript" >BAIDU_CLB_SLOT_ID = "416044";</script>'); document.write(ojs);} if (code=="in852x90_1"){//289000 baidu document.write('<script type="text/javascript" >BAIDU_CLB_SLOT_ID = "288997";</script>'); document.write(ojs);} if (code=="in852x90_2"){//288997 GOOGLE document.write('<script type="text/javascript" >BAIDU_CLB_SLOT_ID = "289000";</script>'); document.write(ojs);} if (code=="in300x90_1"){//289003 document.write('<a href="/show/" target="_blank"><img src="/images/300x90-01.jpg" width="300" height="90" /></a>');} if (code=="in300x90_2"){//289007 document.write('<a href="/zt/book/" target="_blank"><img src="/images/300x90-02.jpg" width="300" height="90" /></a>');} if (code=="in300x250"){ document.write('<script type="text/javascript" >BAIDU_CLB_SLOT_ID = "289013";</script>'); document.write(ojs);} if (code=="widget"){// widget document.write('<script type="text/javascript" >BAIDU_CLB_SLOT_ID = "409341";</script>'); document.write(ojs);} if (code=="yulu"){// 语录 document.writeln("设计语录:"); tips = new Array(50); tips[0] = '比喻强过道理,平凡朴素比阳春白雪更容易让人理解。'; tips[1] = '通过内容展示个性,而不是通过虚饰展示个性。——Facebook Timeline'; tips[2] = '人的接受能力和精力是有限的,给用户一个重点,就是帮助用户节约时间和成本。全是重点等于没有重点。'; tips[3] = '漂亮但无内容的网站,没有人会第三次访问它。'; tips[4] = '所谓策划:简单的问题复杂化,复杂的问题简单化'; tips[5] = '不会打枪的士兵能打仗么?分不清盐和碱的能成为厨师么?不懂web技术能策划网站么?'; tips[6] = '只有那些符合用户需求的技术才有意义,尊重人比尊重科学更重要,不要迷信“科学”。'; tips[7] = '说服别人之前,先说服自己。每个步骤都要有为什么,弄不明白先去问搜索引擎。'; tips[8] = '策划就是打麻将,搜集是洗牌,整理是码牌,判断是打牌,创新是和牌'; tips[9] = '拿来主义必须建立在理解的基础上,否则思路永远是别人的。'; tips[10] = '闭上眼睛,整个网站都已经在脑海里,这才是开始写方案的时候。'; tips[11] = '书籍是作者思想的渣滓,通过咀嚼作者的渣滓,体会作者嘴里的味道,否则永远是在吃泔水。'; tips[12] = '简单抄袭,必死无疑。'; tips[13] = '网站的三个要素中,内容永远最重要,功能其次,表现在最后。'; tips[14] = '从真实用户角度出发去考虑问题,投资人的意见只能作为参考。'; tips[15] = '真实世界中人们总是不得不被迫接受一些信息;而在网络世界,遇到反感内容,他们往往“关掉浏览器跑掉了”。'; tips[16] = '在追求完美的路上,可能会思考太多,反而让双手闲着。'; tips[17] = '搜索引擎喜欢原创内容和结构合理的Html,而并非罗列出来的关键字。'; tips[18] = '不要小觑用户的智慧,他们能想出各种办法逃脱你设置的条条框框,找到属于他们方式。'; tips[19] = '想让用户在网站上消费更多的时间,就应该用流畅快捷的访问帮助用户节约时间成本。'; tips[20] = '纲要>Word>PPT'; tips[21] = '网页文案要说人话,栏目命名不是楹联游戏,简单明了最重要,押韵对仗是其次。'; tips[22] = '千方百计通过网站营造一种氛围,也许你想传达的“感觉”会成为用户的负担。'; tips[23] = '站的高未必看得远,与其追求鹤立鸡群,不如绕着鸡群走。'; tips[24] = '创意并不是一定要追求与众不同,而是让结果更合理,运作更有效。'; tips[25] = '个人行为与小规模配合压根不需要流程与规范,当交付结果需要大规模的应用时,同一的规格就显得非常重要了。'; tips[26] = '任何创作活动都是为了满足一定的需求,创新是执行过程中的副产品;为了创新而创新,是庸人自扰的行为。'; tips[27] = '“放之四海皆准则”的是真理,真理并不是一种方法,没有一种方法能解决所有的问题;掌握真理,而不是掌握某种方法。'; tips[28] = '在理解的基础上借鉴,就是站在巨人的肩膀之上;没有区分的全盘抄袭,就是被巨人踩在脚下。'; tips[29] = '风险管理对网站非常重要,那些可以预测的闪失往往会造成毁灭性的打击,以史为鉴。'; tips[30] = '别总是强迫他们按照你的思维进行访问,设置“取消”功能往往能够更赢得他们的好感,给用户退路等于给自己退路。'; tips[31] = '“点击”在用户的头脑中是一种确定,“拆散信息”并且“分步引导”比设置臃肿的界面更有效。'; tips[32] = '网站的交互就是屏幕复用:内容逻辑架构是骨骼,内容分块填充是血肉,栅格视觉是肌肤,屏幕复用是动作。'; tips[33] = '技术越来越廉价,必须脚踏实体的为用户提供有效的内容,才能够实现技术的价值。'; tips[34] = '用户有两种,一是实在太闲,以网络打发时间;二是实在太忙,必须借助网络节约时间。'; tips[35] = '网站平台需要具备自发的公平属性,以直接交易和交换为先导,广泛参与,达到普及,这才能算平台。'; tips[36] = '所谓“网站定位”就是实事求是的基于各种现状总结出一个对内容建设、功能规划、服务运营有帮助的指导纲领。'; tips[37] = '不要相信“天下设计一大抄”我们可以借鉴,但绝不能抄袭!'; tips[38] = '学设计,也想学习书法一样,临摹是一个必要的过程。'; tips[39] = '随时用零碎的时间(如等人、排队等)做零碎的事情。'; tips[40] = '学会立体的安排时间。例如:先做饭,再打开收音机,边听广播边洗漱。'; tips[41] = '千万别等到想清楚了再做决定,因为等你什么都想清楚了别人也想清楚了。'; tips[42] = '一个团队的能力不能超出总经理个人能力是可怕的,也是可悲的。——Kevin'; tips[43] = '公司负责人应该是管理专家的专家,抓住大事,放开小事,允许错事,防止坏事。'; tips[44] = '设计有两种方法:一种是简单到明显没有缺陷,另一种复杂到缺陷不那么明显。—— 托尼·霍尔'; tips[45] = '广告创意不要超越大多数人的智商,否则会落得无人问津。'; tips[46] = '没人能拥有所有的答案。身边围绕的天才人物越多,你就越有可能得到一些好答案。'; tips[47] = '坚持读书,要永远走在你周围人的前面,追赶别人和被别人追赶会造就两种不同的气度。'; tips[48] = '靠用户调查来设计产品太难。很多时候,要等到你把产品摆在面前,用户才知道想要什么。——乔布斯'; tips[49] = '显而易见,最高的效率就是对现有材料的最佳利用。'; tips[50] = '学会偷懒,并懒出境界是提高工作效率最有效的方法!'; index = Math.floor(Math.random() * tips.length); document.writeln(tips[index]); document.writeln ('  <a href="/zt/yulu/" target="_blank">[发表语录]</a>');} if (code=="lb468x15"){ document.writeln("<script type=\"text\/javascript\"><!--"); document.writeln("google_ad_client = \"ca-pub-4213001413639273\";"); document.writeln("\/* 全站_顶部_468x15 *\/"); document.writeln("google_ad_slot = \"2293322720\";"); document.writeln("google_ad_width = 468;"); document.writeln("google_ad_height = 15;"); document.writeln("\/\/-->"); document.writeln("<\/script>"); document.writeln("<script type=\"text\/javascript\" src=\"http:\/\/pagead2.googlesyndication.com\/pagead\/show_ads.js\"><\/script>");} if (code=="weibo"){// 微博 document.writeln ('<iframe width="120" height="24" frameborder="0" allowtransparency="true" marginwidth="0" marginheight="0" scrolling="no" border="0" src="http://widget.weibo.com/relationship/followbutton.php?language=zh_cn&width=136&height=24&uid=2556500765&style=2&btn=red&dpc=1"></iframe>');} if (code=="egg"){// egg document.write('* 懒人图库承诺:本站所有资源免费下载,无病毒,无弹窗,无干扰链接! <a href="/plus/guestbook.php">全新改版 提点建议</a>');} if (code=="jinbu"){// 进步 document.writeln ('<dd>08月13日 设计语录专题上线</dd>'); document.writeln ('<dd>08月05日 网页背景和小图片添加打包下载</dd>'); document.writeln ('<dd>07月12日 修复搜索、导航和返回顶部BUG</dd>'); document.writeln ('<dd>06月26日 改进网页背景频道预览功能</dd>'); //document.writeln ('<dd>06月23日 改进返回顶部功能</dd>'); //document.writeln ('<dd>06月21日 修复IE6下兼容问题</dd>'); //document.writeln ('<dd>06月01日 懒人图库2012新版上线</dd>'); //document.writeln ('<dd>05月26日 新增北方网通服务器</dd>'); //document.writeln ('<dd>05月23日 网页背景改版上线</dd>'); //document.writeln ('<dd>05月20日 网页小图标改版上线</dd>'); document.writeln ('<dd><a href="/about/event.html">...</a></dd>');} if (code=="tj"){// 统计 var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://"); document.write(unescape("%3Cscript src='" + _bdhmProtocol + "hm.baidu.com/h.js%3F49542e19848a99b43a81376b929e6c72' type='text/javascript'%3E%3C/script%3E")); document.writeln ('<script language="javascript" type="text/javascript" src="http://js.users.51.la/2007336.js"></script>'); document.writeln ('<script src="http://s13.cnzz.com/stat.php?id=322926&web_id=322926" language="JavaScript"></script>'); } if (code=="zan"){// 赞 document.writeln ('<a version="1.0" class="qzOpenerDiv" href="http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_likeurl" target="_blank">赞</a><script src="http://qzonestyle.gtimg.cn/qzone/app/qzlike/qzopensl.js#jsdate=20111107&style=2&showcount=1&width=100&height=30" charset="utf-8" defer="defer" ></script>');} if (code=="bdshare"){// 百度分享 document.writeln("<div id=\"bdshare\" class=\"bdshare_t bds_tools_32 get-codes-bdshare\">"); document.writeln("<a class=\"bds_qzone\"><\/a>"); document.writeln("<a class=\"bds_tsina\"><\/a>"); document.writeln("<a class=\"bds_renren\"><\/a>"); document.writeln("<a class=\"bds_tqq\"><\/a>"); document.writeln("<a class=\"bds_baidu\"><\/a>"); document.writeln("<a class=\"bds_qq\"><\/a>"); document.writeln("<a class=\"bds_kaixin001\"><\/a>"); document.writeln("<a class=\"bds_tsohu\"><\/a>"); document.writeln("<a class=\"bds_douban\"><\/a>"); document.writeln("<span class=\"bds_more\">更多<\/span>"); document.writeln("<a class=\"shareCount\"><\/a>"); document.writeln("<\/div>"); document.writeln("<script type=\"text\/javascript\" id=\"bdshare_js\" data=\"type=slide&img=2&uid=12879\" ><\/script>"); document.writeln("<script type=\"text\/javascript\" id=\"bdshell_js\"><\/script>"); document.writeln("<script type=\"text\/javascript\">"); document.writeln("var bds_config = {\"bdTop\":130};"); document.writeln("document.getElementById(\"bdshell_js\").src = \"http:\/\/bdimg.share.baidu.com\/static\/js\/shell_v2.js?t=\" + new Date().getHours();"); document.writeln("<\/script>");} // 50x50 (function($){$.fn.VMiddleImg=function(options){var defaults={"width":null,"height":null};var opts=$.extend({},defaults,options);return $(this).each(function(){var $this=$(this);var objHeight=$this.height();var objWidth=$this.width();var parentHeight=opts.height||$this.parent().height();var parentWidth=opts.width||$this.parent().width();var ratio=objHeight/objWidth;if(objHeight>parentHeight&&objWidth>parentWidth){if(objHeight>objWidth){$this.width(parentWidth);$this.height(parentWidth*ratio);}else{$this.height(parentHeight);$this.width(parentHeight/ratio);} objHeight=$this.height();objWidth=$this.width();if(objHeight>objWidth){$this.css("top",(parentHeight-objHeight)/2);}else{$this.css("left");}} else{if(objWidth>parentWidth){$this.css("left",(parentWidth-objWidth)/2);} $this.css("top",(parentHeight-objHeight)/2);}});};})(jQuery);$(".f").VMiddleImg(); } // lazyload // 搜索 function dysearch() { document.writeln("<form name=formsearch onSubmit='return bottomForm();' method=post>"); document.writeln("<div id='x1' class='sa'>"); document.writeln("<a id='s0'>矢量</a>"); document.writeln("<span style='display:none' id='x2' class='lanmu'> "); document.writeln("<a id=s1>矢量<\/a>");document.writeln("<a id=s2>代码<\/a>"); document.writeln("<a id=s3>图标<\/a>");document.writeln("<a id=s4>表情<\/a>"); document.writeln("<a id=s5>全站<\/a>");document.writeln("<\/span>");document.writeln("<\/div> "); document.writeln("<input id=\"typeid\" name=\"typeid\" type=\"hidden\" value=\"1\">"); document.writeln("<input id=\"q\" class=sb name=\"keyword\" onFocus=\"if(this.value==\'请输入关键词\'){this.value=\'\';}else{this.select();}this.style.color=\'black\';\" value=请输入关键词>"); document.writeln("<input class=sc name=Input type=\"submit\" value=\"\">");document.writeln("<\/form>") function $$(id){if(document.getElementById){return document.getElementById(id);} else if(document.layers){return document.layers[id];} else{return false;}} (function(){function initHead(){setTimeout(showSubSearch,0)};function showSubSearch() {$$("x1").onmouseover=function(){$$("x2").style.display="";$$("x1").className="sa sa_hover"};$$("x1").onmouseout=function(){$$("x2").style.display="none";$$("x1").className="sa"};$$("s1").onclick=function(){selSubSearch(1);$$("q").focus()};$$("s2").onclick=function(){selSubSearch(2);$$("q").focus()};$$("s3").onclick=function(){selSubSearch(3);$$("q").focus()};$$("s4").onclick=function(){selSubSearch(4);$$("q").focus()};$$("s5").onclick=function(){selSubSearch(5);$$("q").focus()};}; function selSubSearch(iType){hbb=[];hbb={1:["矢量","1"],2:["代码","js"],3:["图标","png"],4:["表情","48"],5:["全站","0"]};$$("s0").innerHTML=hbb[iType][0];$$("x2").style.display="none";$$("typeid").value=hbb[iType][1];};initHead();})(); } function bottomForm() { var all_var=document.getElementById("typeid").value; var q=document.getElementById("q").value; switch(all_var) {case"png": document.formsearch.action='http://www.lanrentuku.com/manager/plus/png.php?type=search&q='+q break;case"js":document.formsearch.action='http://www.lanrentuku.com/manager/plus/js.php?q='+q break; default: var Sys = {}; var ua = navigator.userAgent.toLowerCase(); var s; (s = ua.match(/msie ([\d.]+)/)) ? Sys.ie = s[1] : (s = ua.match(/firefox\/([\d.]+)/)) ? Sys.firefox = s[1] : (s = ua.match(/chrome\/([\d.]+)/)) ? Sys.chrome = s[1] : (s = ua.match(/opera.([\d.]+)/)) ? Sys.opera = s[1] : (s = ua.match(/version\/([\d.]+).*safari/)) ? Sys.safari = s[1] : 0; if (Sys.ie) {q=encodeURIComponent(q);}//ff document.formsearch.action='http://www.lanrentuku.com/plus/search.php?x='+all_var+'&q='+q;break;} document.formsearch.submit();return false; } // fav function addToFavorite(){var a="http://www.lanrentuku.com/";var b="懒人图库";if(document.all){window.external.AddFavorite(a,b)}else if(window.sidebar){window.sidebar.addPanel(b,a,"")}else{alert("亲,您的浏览器不支持此操作\n请直接使用Ctrl+D收藏本站~")}} // thumb $(function() { $('.list-pic img,.list-pngjs img,.list-qq img,.in-box img').hover(function() { $(this).stop().animate({ "opacity": 0.6 }, 300); }, function() { $(this).stop().animate({ "opacity": 1 }, 300); }); }); // jquery.cookie.min jQuery.cookie=function(name,value,options){if(typeof value!='undefined'){options=options||{};if(value===null){value='';options.expires=-1;}var expires='';if(options.expires&&(typeof options.expires=='number'||options.expires.toUTCString)){var date;if(typeof options.expires=='number'){date=new Date();date.setTime(date.getTime()+(options.expires*24*60*60*1000));}else{date=options.expires;}expires='; expires='+date.toUTCString();}var path=options.path?'; path='+(options.path):'';var domain=options.domain?'; domain='+(options.domain):'';var secure=options.secure?'; secure':'';document.cookie=[name,'=',encodeURIComponent(value),expires,path,domain,secure].join('');}else{var cookieValue=null;if(document.cookie&&document.cookie!=''){var cookies=document.cookie.split(';');for(var i=0;i<cookies.length;i++){var cookie=jQuery.trim(cookies[i]);if(cookie.substring(0,name.length+1)==(name+'=')){cookieValue=decodeURIComponent(cookie.substring(name.length+1));break;}}}return cookieValue;}}; // fs+bg var options={path:'/',expires:30};var cookie_fs=$.cookie("fs");var cookie_bg=$.cookie("bg");$(function(){if(cookie_bg){$('#yuedu').css('background',cookie_bg);} if(cookie_fs){$('#yuedu').css('font-size',cookie_fs+'px');}});function fontsize(num){switch(num){case 1:$("#yuedu").css('font-size','16px');$.cookie("fs","16",options);break;case 2:$("#yuedu").css('font-size','14px');$.cookie("fs","14",options);break;case 3:$("#yuedu").css('font-size','12px');$.cookie("fs","12",options);break;}} function backcolor(num){if(num==1){$("#yuedu").css('background','#F0F6FC');$.cookie("bg","#F0F6FC",options);} if(num==2){$("#yuedu").css('background','#FFFFFF');$.cookie("bg","#FFFFFF",options);} if(num==3){$("#yuedu").css('background','#F6F6F6');$.cookie("bg","#F6F6F6",options);}} // bg+gif $(document).ready(function(){$('.content-bg li,.content-gif li').hover(function(){$(".save",this).stop().animate({top:'162px'},{queue:false,duration:162});},function(){$(".save",this).stop().animate({top:'192px'},{queue:false,duration:162});});}); function runSave(){if(saveImg.location!="about:blank")window.saveImg.document.execCommand("SaveAs");} function saveImgAs(url){if(window.saveImg&&url)window.saveImg.location=url;} document.writeln('<IFRAME style="DISPLAY: none" onload=runSave() src="about:blank" name=saveImg></IFRAME>'); // tx function getByid(id) { if (document.getElementById) { return document.getElementById(id); } else if (document.all) { return document.all[id]; } else if (document.layers) { return document.layers[id]; } else { return null; } } function creatID(DivID){ var objs=getByid(DivID).getElementsByTagName('textarea'); var inps=getByid(DivID).getElementsByTagName('input'); var buts=getByid(DivID).getElementsByTagName('button'); var labs=getByid(DivID).getElementsByTagName('label'); for (i=0; i<objs.length; i++) { objs[i].id="runcode"+i; inps[i].id=i buts[i].id=i labs[i].id=i } } function runCode(obj){ var code=getByid("runcode"+obj).value; var newwin=window.open('','',''); newwin.opener = null; newwin.document.write(code); newwin.document.close(); } function saveCode(obj,title) { var winname = window.open('','',''); winname.document.open('text/html', 'replace'); winname.document.write(document.getElementById(obj).value); winname.document.execCommand('saveas','',title+'.html'); winname.close(); } // 焦点图 (function(d,D,v){d.fn.responsiveSlides=function(h){var b=d.extend({auto:!0,speed:1E3,timeout:7E3,pager:!1,nav:!1,random:!1,pause:!1,pauseControls:!1,prevText:"Previous",nextText:"Next",maxwidth:"",controls:"",namespace:"rslides",before:function(){},after:function(){}},h);return this.each(function(){v++;var e=d(this),n,p,i,k,l,m=0,f=e.children(),w=f.size(),q=parseFloat(b.speed),x=parseFloat(b.timeout),r=parseFloat(b.maxwidth),c=b.namespace,g=c+v,y=c+"_nav "+g+"_nav",s=c+"_here",j=g+"_on",z=g+"_s", o=d("<ul class='"+c+"_tabs "+g+"_tabs' />"),A={"float":"left",position:"relative"},E={"float":"none",position:"absolute"},t=function(a){b.before();f.stop().fadeOut(q,function(){d(this).removeClass(j).css(E)}).eq(a).fadeIn(q,function(){d(this).addClass(j).css(A);b.after();m=a})};b.random&&(f.sort(function(){return Math.round(Math.random())-0.5}),e.empty().append(f));f.each(function(a){this.id=z+a});e.addClass(c+" "+g);h&&h.maxwidth&&e.css("max-width",r);f.hide().eq(0).addClass(j).css(A).show();if(1< f.size()){if(x<q+100)return;if(b.pager){var u=[];f.each(function(a){a=a+1;u=u+("<li><a href='#' class='"+z+a+"'>"+a+"</a></li>")});o.append(u);l=o.find("a");h.controls?d(b.controls).append(o):e.after(o);n=function(a){l.closest("li").removeClass(s).eq(a).addClass(s)}}b.auto&&(p=function(){k=setInterval(function(){var a=m+1<w?m+1:0;b.pager&&n(a);t(a)},x)},p());i=function(){if(b.auto){clearInterval(k);p()}};b.pause&&e.hover(function(){clearInterval(k)},function(){i()});b.pager&&(l.bind("click",function(a){a.preventDefault(); b.pauseControls||i();a=l.index(this);if(!(m===a||d("."+j+":animated").length)){n(a);t(a)}}).eq(0).closest("li").addClass(s),b.pauseControls&&l.hover(function(){clearInterval(k)},function(){i()}));if(b.nav){c="<a href='#' class='"+y+" prev'>"+b.prevText+"</a><a href='#' class='"+y+" next'>"+b.nextText+"</a>";h.controls?d(b.controls).append(c):e.after(c);var c=d("."+g+"_nav"),B=d("."+g+"_nav.prev");c.bind("click",function(a){a.preventDefault();if(!d("."+j+":animated").length){var c=f.index(d("."+j)), a=c-1,c=c+1<w?m+1:0;t(d(this)[0]===B[0]?a:c);b.pager&&n(d(this)[0]===B[0]?a:c);b.pauseControls||i()}});b.pauseControls&&c.hover(function(){clearInterval(k)},function(){i()})}}if("undefined"===typeof document.body.style.maxWidth&&h.maxwidth){var C=function(){e.css("width","100%");e.width()>r&&e.css("width",r)};C();d(D).bind("resize",function(){C()})}})}})(jQuery,this,0); $(function() { $(".f426x240").responsiveSlides({ auto: true, pager: true, nav: true, speed: 700, maxwidth: 426 }); $(".f160x160").responsiveSlides({ auto: true, pager: true, speed: 700, maxwidth: 160 }); });
FastReport.v4.15 for.Delphi.BCB.Full.Source企业版含ClientServer中文修正版支持Delphi 4-XE5 and C++Builder 6-XE5. D2010以上版本(D14_D19)安装必读 delphi2010以上版本(D14_D19)使用者安装时,请将res\frccD14_D19.exe更名名为frcc.exe frccD14_D19.exe是专门的delphi2010以上版本(D14_D19)编码器。其他低delphi版本,请使用frcc.exe FastReport® VCL is an add-on component that allows your application to generate reports quickly and efficiently. FastReport® provides all the tools necessary for developing reports, including a visual report designer, a reporting core, and a preview window. It can be used in Embarcadero (ex Borland and CodeGear) Delphi 4-XE5 and C++Builder 6-XE5. version 4.15 --------------- + Added Embarcadero RAD Studio XE5 support + Added Internal components for FireDac database engine + fixed bug with images in PDF export for OSX viewers + Added ability to set font charset to default in Style Editor - fixed duplex problem when printing several copies of the report - fixed problem with PNG images - fixed problem with TfrxPictureView transparent version 4.14 --------------- + Added Embarcadero RAD Studio XE4 support - [Lazarus] fixed bug with text output - [Lazarus] fixed bug with some visual controls in designer - [Lazarus] improved interface of the report preview and designer - [Lazarus] fixed bug with boolean propertyes in script code and expressions - fixed bug with endless loop in TfrxRichView - fixed bug with Unicode in TfrxMemoView appeared in previous release - improved MAPI interface in TfrxExportMail export - fixed some problems with allpication styles XE2/XE3 - improved compatibility with Fast Report FMX version 4.13 --------------- + Added Lazarus Beta support starts from Fast Report Professionnal edition. Current version allows preview, print and design report template under Windows and Linux platform (qt). + Added Embarcadero RAD Studio XE3 support - fixed compatibility with Fast Report FMX installed in the same IDE. This version can co exist with Fast Report FMX version at the same time. + published "Quality" property of TfrxPDFExport object + published "UseMAPI" property of TfrxExportMail object + published "PictureType" property to ODF export - fixed bug with expressions in RichEdit - fixed bug in multi-column reports - fixed exception in the report designer - fixed bug with URLs in Open Document Text and Open Document Spreadsheet exports - fixed format string in XLS OLE export - fixed format string in XLS BIFF8 export - fixed output of the check boxes on the highlighted lines in PDF export - fixed bug with PDF anchors - fixed bug when using two or more macroses in memo version 4.12 --------------- + added support of Embarcadero Rad Studio EX2 (x32/x64) + added export of Excel formulas in the BIFF export + added export of external URLs in the PDF export + added converter from Rave Reports ConverterRR2FR.pas + added Cross.KeepRowsTogether property + optimised merging cells in the BIFF export + added property DataOnly to exports + pictures format in all exports switched to PNG + improved number formats processing in the BIFF export + added property DataOnly to exports + added property TfrxODFExport.SingleSheet + added property TfrxSimpleTextExport.DeleteEmptyColumns + added property TfrxBIFFExport.DeleteEmptyRows + added progress bar to the BIFF export - fixed bug with frame for some barcode types - fixed wrong metafiles size in the EMF export - fixed processing of negative numbers in the OLE export - fixed bug in handling exceptions in the OLE export - fixed bug in creation of the progress bar (applicable to many exports) - fixed bug in the ODF export in strings processing - fixed bug in the OLE export in numbers formatting - fixed bug in the PDF export in rotating texts 90, 180 and 270 degrees - fixed bug in the ODF export in processing of headers and footers - fixed bug in the Text export in computing object bounds - fixed bug in the ODF export in UTF8 encoding - fixed hiding gridlines around nonempty cells in the BIFF export - fixed images bluring when exporting - fixed word wrapping in the Excel XML export version 4.11 --------------- + added BIFF8 XLS export filter + added to ODF export the Language property + [enterprise] added "scripts" folder for additional units ("uses" directive in report script) + [enterprise] added logs for scheduler (add info in scheduler.log) + [enterprise] added property "Reports" - "Scripts" in server configuration - set the path for "uses" directive in report script + [enterprise] added property "Http" - "MaxSessions" in server configuration - set the limit of maximum session threads, set 0 for unlimit + [enterprise] added property "Reports" - "MaxReports" in server configuration - set the limit of maximum report threads, set 0 for unlimit + [enterprise] added property "Logs" - "SchedulerLog" in server configuration - set the scheduler log file name + [enterprise] added property "Scheduler" - "Active" in server configuration - enable of scheduler + [enterprise] added property "Scheduler" - "Debug" in server configuration - enable writing of debug info in scheduler log + [enterprise] added property "Scheduler" - "StudioPath" in server configuration - set the path to FastReport Studio, leave blank for default - [enterprise] fixed bug with MIME types in http header (content-type) - [enterprise] fixed bug with default configuration (with missed config.xml) - [enterprise] fixed bug with error pages - fixed bug in XML export with the ShowProgress property - fixed bug in RTF export with font size in empty cells - fixed bug in ODF export with UTF8 encoding of the Creator field - fixed bug in XML export with processing special characters in strings - fixed bug in ODF export with properties table:number-columns-spanned, table:number-rows-spanned - fixed bug in ODF export with the background clNone color - fixed bug in ODF export with a style of table:covered-table-cell - fixed bug in ODF export with table:covered-table-cell duplicates - fixed bug in ODF export with excessive text:p inside table:covered-table-cell - fixed bug in ODF export with language styles - fixed bug in ODF export with spaces and tab symbols - fixed bug in ODF export with styles of number cells - fixed bug in ODF export with the background picture - fixed bug in ODF export with charspacing - fixed bug in ODF export with number formatting - fixed bug in ODF export with table-row tag - fixed bug in XLS(OLE) export with numbers formatting - fixed bug in RTF export with processing RTF fields - fixed bug with processing special symbols in HTML Export - fixed bug with UTF8 encoding in ODF export - fixed bug in PDF export with underlined, struck-out and rotated texts version 4.10 --------------- + added support of Embarcadero Rad Studio XE (Delphi EX/C++Builder EX) + added support of TeeChart 2010 packages (new series type aren't support in this release) + added a property TruncateLongTexts to the XLS OLE export that allows to disable truncating texts longer than a specified limit + added option EmbedProt which allows to disable embedding fonts into an encrypted PDF file + added TfrxDateEditControl.WeekNumbers property - fixed bug in XML and PDF exports with Korean charmap - fixed bug in the XLS XML export about striked-out texts - fixed bug about exporting an empty page via the XLS OLE export - fixed bug in the PDF export about coloring the background of pages - fixed bug in embedded designer when using break point in script - fixed bug with lost of focus in font size combo-box in designer - fixed bug with truncate of font size combo-box in Windows Vista/7 in designer (lost of vertical scroll bar) - fixed bug when lost file name in inherited report - fixed bug in multi-page report with EndlessHeight/EndlessWidth - fixed bug wit TfrxHeader.ReprintOnNewpage and KeepTogether - fixed bug in multi-column report with child bands - improved split mechanism (added TfrxStretcheable.HasNextDataPart for complicated data like RTF tables) - improved crosstab speed when using repeat band with crosstab object version 4.9 --------------- + added outline to PDF export + added anchors to PDF export - fixed bug with embedded TTC fonts in PDF export + added an ability to create multiimage TIFF files + added export headers/footers in ODF export + added ability to print/export transparent pictures (properties TfrxPictureView.Transparent and TfrxPictureView.TransparentColor) (PDF export isn't supported) + added new "split to sheet" modes for TfrxXMLExport + added support of /PAGE tag in TfrxRichView, engine automatically break report pages when find /PAGE tag + added ability to hide Null values in TfrxChartView (TfrxChartView.IgnoreNulls = True) + added ability to set any custom page order for printing (i.e. 3,2,1,5,4 ) + [enterprise] added variables "AUTHLOGIN" and "AUTHGROUP" inside the any report + [enterprise] now any report file can be matched with any (one and more) group, these reports are accessible only in matched groups + [enterprise] now you can set-up cache delays for each report file (reports.xml) + [enterprise] added new properties editor for reports in Configuration utility (see Reports tab) + [enterprise] added property "Xml" - "SplitType" in server configuration - allow to select split on pages type between none/pages/printonprev/rowscount + [enterprise] added property "Xml" - "SplitRowsCount" in server configuration - sets the count of rows for "rowscount" split type + [enterprise] added property "Xml" - "Extension" in server configuration - allow select between ".xml" and ".xls" extension for output file + [enterprise] added property "Html" - "URLTarget" in server configuration - allow select the target attribute for report URLs + [enterprise] added property "ReportsFile" - path to file with reports to groups associations and cache delays + [enterprise] added property "ReportsListRenewTimeout" in server configuration + [enterprise] added property "ConfigRenewTimeout" in server configuration + [enterprise] added property "MimeType" for each output format in server configuration + [enterprise] added property "BrowserPrint" in server configuration - allow printing by browser, added new template nav_print_browser.html + [enterprise] added dynamic file name generation of resulting formats (report_name_date_time) * [enterprise] SERVER_REPORTS_LIST and SERVER_REPORTS_HTML variables (list of available reports) depend from user group (for internal authentification) + added drawing shapes in PDF export (not bitmap) + added rotated text in PDF export (not bitmap) + added EngineOptions.IgnoreDevByZero property allow to ignore division by zero exception in expressions + added properties TfrxDBLookupComboBox.DropDownWidth, TfrxDBLookupComboBox.DropDownRows + added event TfrxCustomExportFilter.OnBeginExport + added ability to decrease font size in barcode object + added ability to inseret FNC1 to "code 128" barcode + added event TfrxPreview.OnMouseDown + added support of new unicode-PDF export in D4-D6 and BCB4-BCB6 * improved AddFrom method - anchor coping - fixed bug with WordWrap in PDF export - fixed bug with underlines in PDF export - fixed bug with rounded rectangles in PDF export - fixed CSV export to fit to the RFC 4180 specification - fixed bug with strikeout text in PDF export - fixed bug with incorrect export of TfrxRichView object in RTF format (wrong line spacing) - [enterprise] added critical section in TfrxServerLog.Write - fixed bug with setting up of the Protection Flags in the PDF export dialog window - fixed bug in PDF export (file structure) - fixed bug with pictures in Open Office Writer (odt) export - [enterprise] fixed bug with TfrxReportServer component in Delphi 2010 - fixed minor errors in Embarcedero RAD Studio 2010 - fixed bug with endless loop with using vertical bands together with page header and header with ReprintOnNewPage - fixed bug when using "Keeping" and Cross tables (incorrect cross transfer) - fixed bug with [CopyName#] macros when use "Join small pages" print mode - fixed bug when try to split page with endless height to several pages (NewPage, StartNewPage) - fixed bug with empty line TfrxRichView when adding text via expression - fixed bug when Footer prints even if main band is invisible (FooterAfterEach = True) - fixed resetting of Page variable in double-pass report with TfrxCrossView - fixed bug with loosing of aligning when split TfrxRichView - fixed buzz in reports with TfrxRichView when using RTF 4.1 version 4.8 --------------- + added support of Embarcadero Rad Studio 2010 (Delphi/C++Builder) + added TfrxDBDataset.BCDToCurrency property + added TfrxReportOptions.HiddenPassword property to set password silently from code + added TfrxADOConnection.OnAfterDisconnect event + added TfrxDesigner.MemoParentFont property + added new TfrxDesignerRestriction: drDontEditReportScript and drDontEditInternalDatasets + adedd checksum calculating for 2 5 interleaved barcode + added TfrxGroupHeader.ShowChildIfDrillDown property + added TfrxMailExport.OnSendMail event + added RTF 4.1 support for TfrxRichText object + [enterprise] added Windows Authentification mode + added confirmation reading for TfrxMailExport + added TimeOut field to TfrxMailExport form + added ability to use keeping(KeepTogether/KeepChild/KeepHeader) in multi-column report + added ability to split big bands(biggest than page height) by default * [enterprise] improved CGI for IIS/Apache server * changed PDF export (D7 and upper): added full unicode support, improved performance, decreased memory requirements old PDF export engine saved in file frxExportPDF_old.pas - changed inheritance mechanism, correct inherits of linked objects (fixups) - fixed bug with Mirror Mrgins in RTF, HTML, XLS, XML, OpenOffice exports - fixed bug when cross tab cut the text in corner, when corner height greater than column height - [fs] improved script compilation - improved WatchForm TListBox changet to TCheckListBox - improved AddFrom method - copy outline - Improved functional of vertical bands, shows memos placed on H-band which doesn't across VBand, also calculate expression inside it and call events (like in FR2) - Improved unsorted mode in crosstab(join same columns correctly) - Improved converter from Report Builder - Improved TfrxDesigner.OnInsertObject, should call when drag&drop field from data tree - improved DrillDownd mechanism, should work correct with master-detail-subtetail nesting - fixed bug with DownThenAcross in Cross Tab - fixed several bugs under CodeGear RAD Studio (Delphi/C++Builder) 2009 - fixed bug with emf in ODT export - fixed bug with outline when build several composite reports in double pass mode - fixed bug when group doesn't fit on the whole page - fixed "Page" and "Line" variables inside vertical bands - fixed bug with using KeepHeader in some cases - fixed bug with displacement of subreport when use PrintOnParent property in some cases - fixed small memory leak in subreports - fixed problem with PageFooter and ReportSymmary when use PrintOnPreviousPage property - fixed bug when designer shows commented functions in object inspector - fixed bug when designer place function in commented text block - fixed bug when Engine try to split non-stretcheable view and gone to endless loop - fixed bug with HTML tags in memo when use shot text and WordWrap - [enterprise] fixed bug with variables lost on refresh/export - fixed bug whih PDF,ODT export in Delphi4 and CBuilder4 - fixed bug with some codepage which use two bytes for special symbols (Japanese ans Chinese codepages) - fixed bug when engine delete first space from text in split Memo - fixed bug in multi-column page when band overlap stretched PageHeader - fixed bug with using ReprintOnNewPage version 4.7 --------------- + CodeGear RAD Studio (Delphi/C++Builder) 2009 support + [enterprise] enchanced error description in logs + added properties TfrxHTMLExport.HTMLDocumentBegin: TStrings, TfrxHTMLExport.HTMLDocumentBody: TStrings, TfrxHTMLExport.HTMLDocumentEnd: TStrings + improved RTF export (with line spacing, vertical gap etc) + added support of Enhanced Metafile (EMF) images in Rich Text (RTF), Open Office (ODS), Excel (XLS) exports + added OnAfterScriptCompile event + added onLoadRecentFile Event + added C++ Builder demos + added hot-key Ctrl + mouseWheel - Change scale in designer + added TfrxMemoView.AnsiText property - fixed bug in RTF export with EMF pictures in OpenOffice Writer - fixed some multi-thread isuues in engine, PDF, ODF exports - [enterprise] fixed integrated template of report navigator - [enterprise] fixed bug with export in Internet Explorer browser - fixed bug with font size of dot-matix reports in Excel and XML exports - fixed bug in e-mail export with many addresses - fixed bug in XLS export (with fast export unchecked and image object is null) - [enterprise] fixed bug in TfrxReportServer.OnGetVariables event - fixed bug in Calcl function - fixed memory leak in Cross editor - fixed progress bar and find dialog bug in DualView - fixed bug in PostNET and ean13 barcodes - fixed bug with TruncOutboundText in Dot Matrix report - fixed bugs with break points in syntaxis memo - improved BeforeConnect event in ADO - fixed bug in inhehited report with internal dataset - fixed bug in TfrxPanelControl with background color(Delphi 2005 and above) version 4.6 --------------- + added & , < , > to XML reader + added <nowrap> tag, the text concluded in tag is not broken by WordWrap, it move entirely + added ability to move band without objects (Alt + Move) + added ability to output pages in the preview from right to left ("many pages" mode), for RTL languages(PreviewOptions.RTLPreview) + added ability to storing picture cache in "temp" file (PreviewOptions.PictureCacheInFile) + added EngineOptions.UseGlobalDataSetList (added for multi-thread applications) - set it to False if you don't want use Global DataSet list(use Report.EnabledDataSet.Add() to add dataset in local list) + added new property Hint for all printed objects, hints at the dialog objects now shows in StatusBar + added new property TfrxDBLookupComboBox.AutoOpenDataSet (automatically opens the attached dataset after onActivate event) + added new property TfrxReportPage.PageCount like TfrxDataBand.RowCount + added new property WordWrap for dialog buttons (Delphi 7 and above). + added sort by name to data tree + added TfrxDesigner.TemplatesExt property + added TfrxStyles class in script rtti + changes in the Chart editor: ability to change the name of the series, ability to move created series, other small changes + [enterprise] added configurations values refresh in run-time + [enterprise] added new demo \Demos\ClientServer\ISAPI + [enterprise] added output to server printers from user browser (see config.xml "AllowPrint", set to "no" by default), note: experimental feature + [enterprise] added reports list refresh in run-time + [enterprise] added templates feature + [enterprise] improved speed and stability + [fs] added TfsScript.IncludePath property + [fs] added TfsScript.UseClassLateBinding property + [fs] fixed type casting from variant(string) to integer/float - changes in report inherit: FR get relative path from current loaded report(old reports based on application path works too) - corrected module for converting reports from Report Builder - fixed bug in CrossTab when set charset different from DEFAULT_CHARSET - fixed bug in RTF export with some TfrxRichView objects - fixed bug when print on landscape orientation with custom paper size - fixed bug when use network path for parent report - fixed bug with Band.Allowslit = True and ColumnFooter - fixed bug with drawing subreport on stretched band - fixed bug with embedded fonts in PDF export - fixed bug with long ReportTitle + Header + MaterData.KeepHeader = true - fixed bug with minimizing of Modal designer in BDS2005 and above - fixed bug with paths in HTML export - fixed bug with RTL in PDF export - fixed bug with SubReport in multi column page - fixed bug with Subreport.PrintOnParent = true in inherited report - fixed bug with SYMBOL_CHARSET in PDF export - fixed bug with the addition of datasets by inheritance report - fixed bug with width calculation when use HTML tags in memo - fixed compatibility with WideStrings module in BDS2006/2007 - fixed flicking in preview when use OnClickObject event - fixed free space calculation when use PrintOnPreviousPage - fixed preview bug with winXP themes and in last update - fixed subreports inherit - Thumbnail and Outline shows at right side for RTL languages - [fs] fixed bug with late binding version 4.5 --------------- + added ConverterRB2FR.pas unit for converting reports from Report Builder to Fast Report + added ConverterQR2FR.pas unit for converting reports from QuickReport to FastReport + added support of multiple attachments in e-mail export (html with images as example) + added support of unicode (UTF-8) in e-mail export + added ability to change templates path in designer + added OnReportPrint script event + added PNG support in all version (start from Basic) + added TfrxDMPMemoView.TruncOutboundText property - truncate outbound text in matrix report when WordWrap=false + added new frames styles fsAltDot and fsSquare + added new event OnPreviewDblClick in all TfrxView components + added ability to call dialogs event after report run when set DestroyForms = false + added ability to change AllowExpressions and HideZeros properties in cross Cells (default=false) + added IgnoreDupParams property to DB components + added auto open dataset in TfrxDBLookupComboBox + added new property TfrxADOQuery.LockType + added define DB_CAT (frx.inc) for grouping DB components + added TfrxPictureView.HightQuality property(draw picture in preview with hight quality, but slow down drawing procedure) + [FRViewer] added comandline options "/print filename" and "/silent_print filename" + added unicode input support in RichEditor + added new define HOOK_WNDPROC_FOR_UNICODE (frx.inc) - set hook on GetMessage function for unicode input support in D4-D7/BCB4-BCB6 + added ability chose path to FIB packages in "Recompile Wizard" + added new function TfrxPreview.GetTopPosition, return a position on current preview page + added new hot-keys to Code Editor - Ctrl+Del delete the word before cursor, Ctrl+BackSpace delete the word after cursor(as in Delhi IDE) + added "MDI Designer" example - all language resources moved to UTF8, XML - fixed bug with html tags [sup] and [sub] - fixed width calculation in TfrxMemoView when use HTML tags - fixed bug with suppressRepeated in Vertical bands - fixed bug when designer not restore scrollbars position after undo/redo - fixed visual bug in toolbars when use Windows Vista + XPManifest + Delphi 2006 - fixed bug in CalcHeight when use negative LineSpace - fixed bug in frx2xto30 when import query/table components, added import for TfrDBLookupControl component - fixed bug with Cross and TfrxHeader.ReprintOnNewPage = true - fixed converting from unicode in TfrxMemoView when use non default charset - [fs] fixed bug with "in" operator - fixed bug with aggregate function SUM - fixed bug when use unicode string with [TotalPages#] in TfrxMemoView - fixed bug with TSQLTimeStampField field type - fixed designer dock-panels("Object Inspector", "Report Tree", "Data Tree") when use designer as MDI or use several non-modal designer windows - fixed bug with hide/show dock-panels("Object Inspector", "Report Tree", "Data Tree"), now it restore size after hiding - fixed bug in XML/XLS export - wrong encode numbers in memo after CR/LF - fiexd bug in RTF export - fixed bug with undo/redo commands in previewPages designer - fixed bug with SuppressRepeated when use KeepTogether in group - fixed bug with SuppressRepeated on new page all events fired twice(use Engine.SecondScriptcall to determinate it) version 4.4 --------------- + added support for CodeGear RAD Studio 2007 + improved speed of PDF, HTML, RTF, XML, ODS, ODT exports + added TfrxReportPage.BackPictureVisible, BackPicturePrintable properties + added rtti for the TfrxCrossView.CellFunctions property + added properties TfrxPDFExport.Keywords, TfrxPDFExport.Producer, TfrxPDFExport.HideToolbar, TfrxPDFExport.HideMenubar, TfrxPDFExport.HideWindowUI, TfrxPDFExport.FitWindow, TfrxPDFExport.CenterWindow, TfrxPDFExport.PrintScaling + added ability recompile frxFIB packages in "recompile wizard" + added ability to set color property for all teechart series which support it + added, setting frame style for each frame line in style editor + added TfrxPreview.Locked property and TfrxPreview.DblClick event + added 'invalid password' exception when load report without crypt + added new parameter to InheritFromTemplate (by default = imDefault) imDefault - show Error dialog, imDelete - delete duplicates, imRename - rename duplicates + added property TfrxRTFExport.AutoSize (default is "False") for set vertical autosize in table cells * redesigned dialog window of PDF export * improved WYSIWYG in PDF export - fixed bug, the PageFooter band overlap the ReportSummary band when use EndlessHeight - fixed bug with lage paper height in preview - fixed bug with outline and encryption in PDF export - fixed bug with solid arrows in PDF export - fixed bug when print TfrxHeader on a new page if ReprintOnNewPage = true and KeepFooter = True - fixed bug when used AllowSplit and TfrxGroupHeader.KeepTogether - fixed page numbers when print dotMatrix report without dialog - fixed bug with EndlessHeight in multi-columns report - fixed font dialog in rich editor - [fs] fixed bug when create TWideStrings in script code - fixed bug with dialog form when set TfrxButtonControl.Default property to True - fixed twice duplicate name error in PreviewPages designer when copy - past object - fixed bug with Preview.Clear and ZmWholePage mode - fixed bug with using "outline" together "embedded fonts" options in PDF export - fixed multi-thread bug in PDF export - fixed bug with solid fill of transparent rectangle shape in PDF export - fixed bug with export OEM_CODEPAGE in RTF, Excel exports - fixed bug with vertical size of single page in RTF export - fixed bug with vertical arrows in PDF export - fixed memory leak with inherited reports version 4.3 --------------- + added support for C++Builder 2007 + added encryption in PDF export + added TeeChart Pro 8 support + added support of OEM code page in PDF export + added TfrxReport.CaseSensitiveExpressions property + added "OverwritePrompt" property in all export components + improved RTF export (WYSIWYG) + added support of thai and vietnamese charsets in PDF export + added support of arrows in PDF export * at inheritance of the report the script from the report of an ancestor is added to the current report (as comments) * some changes in PDF export core - fixed bug with number formats in Open Document Spreadsheet export - fixed bug when input text in number property(Object Inspector) and close Designer(without apply changes) - fixed bug in TfrxDBDataset with reCurrent - fixed bug with memory leak in export of empty outline in PDF format - line# fix (bug with subreports) - fixed bug with edit prepared report with rich object - fixed bug with shadows in PDF export - fixed bug with arrows in designer - fixed bug with margins in HTML, RTF, XLS, XML exports - fixed bug with arrows in exports - fixed bug with printers enumeration in designer (list index of bound) - fixed papersize bug in inherited reports version 4.2 --------------- + added support for CodeGear Delphi 2007 + added export of html tags in RTF format + improved split of the rich object + improved split of the memo object + added TfrxReportPage.ResetPageNumbers property + added support of underlines property in PDF export * export of the memos formatted as fkNumeric to float in ODS export - fixed bug keeptogether with aggregates - fixed bug with double-line draw in RTF export - fix multi-thread problem in PDF export - fixed bug with the shading of the paragraph in RTF export when external rich-text was inserted - fixed bug with unicode in xml/xls export - fixed bug in the crop of page in BMP, TIFF, Jpeg, Gif - "scale" printmode fixed - group & userdataset bugfix - fixed cross-tab pagination error - fixed bug with round brackets in PDF export - fixed bug with gray to black colors in RTF export - fixed outline with page.endlessheight - fixed SuppressRepeated & new page - fixed bug with long time export in text format - fixed bug with page range and outline in PDF export - fixed undo in code window - fixed error when call DesignReport twice - fixed unicode in the cross object - fixed designreportinpanel with dialog forms - fixed paste of DMPCommand object - fixed bug with the export of null images - fixed code completion bug - fixed column footer & report summary problem version 4.1 --------------- + added ability to show designer inside panel (TfrxReport.DesignReportInPanel method). See new demo Demos\EmbedDesigner + added TeeChart7 Std support + [server] added "User" parameter in TfrxReportServer.OnGetReport, TfrxReportServer.OnGetVariables and TfrxReportServer.OnAfterBuildReport events + added Cross.KeepTogether property + added TfrxReport.PreviewOptions.PagesInCache property - barcode fix (export w/o preview bug) - fixed bug in preview (AV with zoommode = zmWholePage) - fixed bug with outline + drilldown - fixed datasets in inherited report - [install] fixed bug with library path set up in BDS/Turbo C++ Builder installation - fixed pagefooter position if page.EndlessWidth is true - fixed shift bug - fixed design-time inheritance (folder issues) - fixed chm help file path - fixed embedded fonts in PDF - fixed preview buttons - fixed bug with syntax highlight - fixed bug with print scale mode - fixed bug with control.Hint - fixed edit preview page - fixed memory leak in cross-tab version 4.0 initial release --------------------- Report Designer: - new XP-style interface - the "Data" tab with all report datasets - ability to draw diagrams in the "Data" tab - code completion (Ctrl+Space) - breakpoints - watches - report templates - local guidelines (appears when you move or resize an object) - ability to work in non-modal mode, mdi child mode Report Preview: - thumbnails Print: - split a big page to several small pages - print several small pages on one big - print a page on a specified sheet (with scale) - duplex handling from print dialogue - print copy name on each printed copy (for example, "First copy", "Second copy") Report Core: - "endless page" mode - images handling, increased speed - the "Reset page numbers" mode for groups - reports crypting (Rijndael algorithm) - report inheritance (both file-based and dfm-based) - drill-down groups - frxGlobalVariables object - "cross-tab" object enhancements: - improved cells appearance - cross elements visible in the designer - fill corner (ShowCorner property) - side-by-side crosstabs (NextCross property) - join cells with the same value (JoinEqualCells property) - join the same string values in a cell (AllowDuplicates property) - ability to put an external object inside cross-tab - AddWidth, AddHeight properties to increase width&height of the cell - AutoSize property, ability to resize cells manually - line object can have arrows - added TfrxPictureView.FileLink property (can contain variable or a file name) - separate settings for each frame line (properties Frame.LeftLine, TopLine, RightLine, BottomLine can be set in the object inspector) - PNG images support (uncomment {$DEFINE PNG} in the frx.inc file) - Open Document Format for Office Applications (OASIS) exports, spreadsheet (ods) and text (odt) Enterprise components: - Users/Groups security support (see a demo application Demos\ClientServer\UserManager) - Templates support - Dynamically refresh of configuration, users/groups D2010以上版本(D14_D19)安装必读 delphi2010以上版本(D14_D19)使用者安装时,请将res\frccD14_D19.exe更名名为frcc.exe frccD14_D19.exe是专门的delphi2010以上版本(D14_D19)编码器。其他低delphi版本,请使用frcc.exe
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" 自动刷新 <meta HTTP-EQUIV="refresh" CONTENT="8;URL=http://c98.yeah.net"> 简单邮件 <a href="mailto:[email protected]?subject=ccc&body=xxxyyy"> 快速转到位置 obj.scrollIntoView(true) 锚 <a name="first"> <a href="#first">anchors</a> 网页传递参数 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] 防止点击空链接时,页面往往重置到页首端。 <a href="javascript:function()">word</a> 上一网页源 asp: request.servervariables("HTTP_REFERER") javascript: document.referrer 释放内存 CollectGarbage(); 禁止右键 document.oncontextmenu = function() { return false;} 禁止保存 <noscript><iframe src="*.htm"></iframe></noscript> 禁止选取<body oncontextmenu="return false" ondragstart="return false" onselectstart ="return false" onselect="document.selection.empty()" oncopy="document.selection.empty()" onbeforecopy="return false"onmouseup="document.selection.empty()> 禁止粘贴 <input type=text onpaste="return false"> 地址栏图标 <link rel="Shortcut Icon" href="favicon.ico"> favicon.ico 名字最好不变16*16的16色,放虚拟目录根目录下 收藏栏图标 <link rel="Bookmark" href="favicon.ico"> 查看源码 <input type=button value=查看网页源代码 onclick="window.location = "view-source:"+ "http://www.csdn.net/""> 关闭输入法 <input style="ime-mode:disabled"> 自动全选 <input type=text name=text1 value="123" onfocus="this.select()"> ENTER键可以让光标移到下一个输入框 <input onkeydown="if(event.keyCode==13)event.keyCode=9"> 文本框的默认值 <input type=text value="123" onfocus="alert(this.defaultValue)"> title换行 obj.title = "123&#13sdfs&#32" 获得时间所代表的微秒 var n1 = new Date("2004-10-10".replace(/-/g, "/")).getTime() 窗口是否关闭 win.closed checkbox扁平 <input type=checkbox style="position: absolute; clip:rect(5px 15px 15px 5px)"><br> 获取选中内容 document.selection.createRange().duplicate().text 自动完成功能 <input type=text autocomplete=on>打开该功能 <input type=text autocomplete=off>关闭该功能 窗口最大化 <body onload="window.resizeTo(window.screen.width - 4,window.screen.height-50);window.moveTo(-4,-4)"> 无关闭按钮IE window.open("aa.htm", "meizz", "fullscreen=7"); 统一编码/解码 alert(decodeURIComponent(encodeURIComponent("http://你好.com?as= hehe"))) encodeURIComponent对":"、"/"、";" 和 "?"也编码 表格行指示 <tr onmouseover="this.bgColor="#f0f0f0"" onmouseout="this.bgColor="#ffffff""> //各种尺寸 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; //过滤数字 <input type=text onkeypress="return event.keyCode>=48&&event.keyCode<=57||(this.value.indexOf(".")<0?event.keyCode==46:false)" onpaste="return !clipboardData.getData("text").match(/D/)" ondragenter="return false"> //特殊用途 <input type=button value=导入收藏夹 onclick="window.external.ImportExportFavorites(true,"http://localhost");"> <input type=button value=导出收藏夹 onclick="window.external.ImportExportFavorites(false,"http://localhost");"> <input type=button value=整理收藏夹 onclick="window.external.ShowBrowserUI("OrganizeFavorites", null)"> <input type=button value=语言设置 onclick="window.external.ShowBrowserUI("LanguageDialog", null)"> <input type=button value=加入收藏夹 onclick="window.external.AddFavorite("http://www.google.com/", "google")"> <input type=button value=加入到频道 onclick="window.external.addChannel("http://www.google.com/")"> <input type=button value=加入到频道 onclick="window.external.showBrowserUI("PrivacySettings",null)"> //不缓存 <META HTTP-EQUIV="pragma" CONTENT="no-cache"> <META HTTP-EQUIV="Cache-Control" CONTENT="no-cache, must-revalidate"> <META HTTP-EQUIV="expires" CONTENT="0"> //正则匹配匹配中文字符的正则表达式: [u4e00-u9fa5] 匹配双字节字符(包括汉字在内):[^x00-xff] 匹配空行的正则表达式: [s| ]* 匹配HTML标记的正则表达式:/<(.*)>.*</1>|<(.*) />/ 匹配首尾空格的正则表达式:(^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,""))" //消除图像工具栏 <IMG SRC="mypicture.jpg" HEIGHT="100px" WIDTH="100px" GALLERYIMG="false"> or <head> <meta http-equiv="imagetoolbar" content="no"> </head> //无提示关闭 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 = "<object id=noTipClose classid="clsid:ADB880A6-D8FF-11CF-9377-00AA003B7A11">" str += "<param name="Command" value="Close"></object>"; 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 } </script> //获得控件的绝对位置(2) oRect = obj.getBoundingClientRect(); oRect.left oRect. //最小化,最大化,关闭 <object id=min classid="clsid:ADB880A6-D8FF-11CF-9377-00AA003B7A11"> <param name="Command" value="Minimize"></object> <object id=max classid="clsid:ADB880A6-D8FF-11CF-9377-00AA003B7A11"> <param name="Command" value="Maximize"></object> <OBJECT id=close classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11"> <PARAM NAME="Command" value="Close"></OBJECT> <input type=button value=最小化 onclick=min.Click()> <input type=button value=最大化 onclick=max.Click()> <input type=button value=关闭 onclick=close.Click()> //光标停在文字最后 <script language="javascript"> function cc() { var e = event.srcElement; var r =e.createTextRange(); r.moveStart("character",e.value.length); r.collapse(true); r.select(); } </script> <input type=text name=text1 value="123" onfocus="cc()"> //页面进入和退出的特效 进入页面<meta http-equiv="Page-Enter" content="revealTrans(duration=x, transition=y)"> 推出页面<meta http-equiv="Page-Exit" content="revealTrans(duration=x, transition=y)"> 这个是页面被载入和调出时的一些特效。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 //网页是否被检索 <meta name="ROBOTS" content="属性值">   其中属性值有以下一些:   属性值为"all": 文件将被检索,且页上链接可被查询;   属性值为"none": 文件不被检索,而且不查询页上的链接;   属性值为"index": 文件将被检索;   属性值为"follow": 查询页上的链接;   属性值为"noindex": 文件不检索,但可被查询链接;   属性值为"nofollow": //打印分页 <p style="page-break-after:always">page1</p> <p style="page-break-after:always">page2</p> //设置打印 <object id="factory" style="display:none" viewastext classid="clsid:1663ed61-23eb-11d2-b92f-008048fdd814" codebase="http://www.meadroid.com/scriptx/ScriptX.cab#Version=5,60,0,360" ></object> <input type=button value=页面设置 onclick="factory.printing.PageSetup()"> <input type=button value=打印预览 onclick="factory.printing.Preview()"> <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 } </script> <input type=button value="打印本页" onclick="factory.printing.Print(false)"> <input type=button value="页面设置" onclick="factory.printing.PageSetup()"> <input type=button value="打印预览" onclick="factory.printing.Preview()"><br> <a href="http://www.meadroid.com/scriptx/docs/printdoc.htm?static" target=_blank>具体使用手册,更多信息,点这里</a> //自带的打印预览 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) 关闭窗体无提示 <style media=print> .Noprint{display:none;}<!--用本样式在打印时隐藏非打印项目--> .PageNext{page-break-after: always;}<!--控制分页--> </style> <object id="WebBrowser" width=0 height=0 classid="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"> </object> <center class="Noprint" > <input type=button value=打印 onclick=document.all.WebBrowser.ExecWB(6,1)> <input type=button value=直接打印 onclick=document.all.WebBrowser.ExecWB(6,6)> <input type=button value=页面设置 onclick=document.all.WebBrowser.ExecWB(8,1)> </p> <p> <input type=button value=打印预览 onclick=document.all.WebBrowser.ExecWB(7,1)> </center> //去掉打印时的页眉页脚 <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){} } </script> <input type="button" value="清空页码" onclick=PageSetup_Null()> <input type="button" value="恢复页码" onclick=PageSetup_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; } //计算内容宽和高 <SCRIPT language="javascript"> function test(obj) { var range = obj.createTextRange(); alert("内容区宽度: " + range.boundingWidth + "px 内容区高度: " + range.boundingHeight + "px"); } </SCRIPT> <BODY> <Textarea id="txt" height="150">sdf</textarea><INPUT type="button" value="计算内容宽度" onClick="test(txt)"> </BODY> //无模式的提示框 function modelessAlert(Msg) { window.showModelessDialog("javascript:alert(""+escape(Msg)+"");window.close();","","status:no;resizable:no;help:no;dialogHeight:height:30px;dialogHeight:40px;"); } //屏蔽按键 <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <noscript><meta http-equiv="refresh" content="0;url=about:noscript"></noscript> <title>屏蔽鼠标右键、Ctrl+N、Shift+F10、Alt+F4、F11、F5刷新、退格键</title> </head> <body> <script language="Javascript"><!-- //屏蔽鼠标右键、Ctrl+N、Shift+F10、F11、F5刷新、退格键 //Author: meizz(梅花雨) 2002-6-18 function document.oncontextmenu(){event.returnValue=false;}//屏蔽鼠标右键 function window.onhelp(){return false} //屏蔽F1帮助 function document.onkeydown() { if ((window.event.altKey)&& ((window.event.keyCode==37)|| //屏蔽 Alt+ 方向键 ← (window.event.keyCode==39))) //屏蔽 Alt+ 方向键 → { alert("不准你使用ALT+方向键前进或后退网页!"); event.returnValue=false; } /* 注:这还不是真正地屏蔽 Alt+ 方向键, 因为 Alt+ 方向键弹出警告框时,按住 Alt 键不放, 用鼠标点掉警告框,这种屏蔽方法就失效了。以后若 有哪位高手有真正屏蔽 Alt 键的方法,请告知。*/ if ((event.keyCode==8) || //屏蔽退格删除键 (event.keyCode==116)|| //屏蔽 F5 刷新键 (event.ctrlKey && event.keyCode==82)){ //Ctrl + R event.keyCode=0; event.returnValue=false; } if (event.keyCode==122){event.keyCode=0;event.returnValue=false;} //屏蔽F11 if (event.ctrlKey && event.keyCode==78) event.returnValue=false; //屏蔽 Ctrl+n if (event.shiftKey && event.keyCode==121)event.returnValue=false; //屏蔽 shift+F10 if (window.event.srcElement.tagName == "A" && window.event.shiftKey) window.event.returnValue = false; //屏蔽 shift 加鼠标左键新开一网页 if ((window.event.altKey)&&(window.event.keyCode==115)) //屏蔽Alt+F4 { window.showModelessDialog("about:blank","","dialogWidth:1px;dialogheight:1px"); return false; } } </script> 屏蔽鼠标右键、Ctrl+N、Shift+F10、Alt+F4、F11、F5刷新、退格键 </body> </html> //屏蔽打印 <style> @media print{ * {display:none} } </style> //移动的图层,拖动 1.<span style="position:absolute;width:200;height:200;background:red" onmousedown=MouseDown(this) onmousemove=MouseMove() onmouseup=MouseUp()>meizz</span> <script language=javascript> var Obj; function MouseDown(obj) { Obj=obj; Obj.setCapture(); Obj.l=event.x-Obj.style.pixelLeft; Obj.t=event.y-Obj.style.pixelTop; } function MouseMove() { if(Obj!=null) { Obj.style.left = event.x-Obj.l; Obj.style.top = event.y-Obj.t; } } function MouseUp() { if(Obj!=null) { Obj.releaseCapture(); Obj=null; } } </script> 2. <div id="myDiv" src="logo.gif" ondrag="doDrag();" onmouseover="this.style.cursor="hand"" style="position:absolute;left=100;top=100;" onmousedown="doMouseDown();"> <a href="#" onclick="return false"><h1>wlecome</h1></a> </div> <script language="JavaScript" type="text/javascript"> var orgMouseX; var orgMouseY; var orgObjX; var orgObjY; function doDrag() { var myObject=document.all.myDiv; var x=event.clientX; var y=event.clientY; myObject.style.left=x-(orgMouseX-orgObjX); myObject.style.top=y-(orgMouseY-orgObjY); } function doMouseDown() { orgMouseX=event.clientX; orgMouseY=event.clientY; orgObjX=parseInt(document.all.myDiv.style.left); orgObjY=parseInt(document.all.myDiv.style.top); } </script> //文档状态改变 <iframe src="a.html" id="f" name="f" scrolling="no" frameborder=0 marginwidth=0 marginheight=0></iframe> <script> var doc=window.frames["f"].document; function s(){ if (doc.readyState=="complete"){ document.all.f.style.height=doc.body.scrollHeight document.all.f.style.width=doc.body.scrollWidth } } doc.onreadystatechange=s </script> //刷新后不变的文本框 <HTML> <HEAD> <META NAME="save" CONTENT="history"> <STYLE> .sHistory {behavior:url(#default#savehistory);} </STYLE> </HEAD> <BODY> <INPUT class=sHistory type=text id=oPersistInput> </BODY> </HTML> //访问剪贴板 (1)拖拽访问 event.dataTransfer.setData("URL", oImage.src); sImageURL = event.dataTransfer.getData("URL") (2)普通访问 window.clipboardData.setData("Text",oSource.innerText); window.clipboardData.getData("Text"); //操作COOKIE function SetCookie(sName, sValue) { document.cookie = sName + "=" + escape(sValue) + "; "; } function GetCookie(sName) { var aCookie = document.cookie.split("; "); for (var i=0; i < aCookie.length; i++) { var aCrumb = aCookie[i].split("="); if (sName == aCrumb[0]) return unescape(aCrumb[1]); } } function DelCookie(sName) { document.cookie = sName + "=" + escape(sValue) + "; expires=Fri, 31 Dec 1999 23:59:59 GMT;"; } //setTimeout增加参数 <script> var _st = window.setTimeout; window.setTimeout = function(fRef, mDelay) { if(typeof fRef == "function"){ var argu = Array.prototype.slice.call(arguments,2); var f = (function(){ fRef.apply(null, argu); }); return _st(f, mDelay); } return _st(fRef,mDelay); } function test(x){ alert(x); } window.setTimeout(test,1000,"fason"); </script> //自定义的apply,call Function.prototype.apply = function (obj, argu) { if (obj) obj.constructor.prototype._caller = this; var argus = new Array(); for (var i=0;i<argu.length;i++) argus[i] = "argu[" + i + "]"; var r; eval("r = " + (obj ? ("obj._caller(" + argus.join(",") + ");") : ("this(" + argus.join(",") + ");"))); return r; }; Function.prototype.call = function (obj) { var argu = new Array(); for (var i=1;i<arguments.length;i++) argu[i-1] = arguments[i]; return this.apply(obj, argu); }; //下载文件 function DownURL(strRemoteURL,strLocalURL) { try { var xmlHTTP=new ActiveXObject("Microsoft.XMLHTTP"); xmlHTTP.open("Get",strRemoteURL,false); xmlHTTP.send(); var adodbStream=new ActiveXObject("ADODB.Stream"); adodbStream.Type=1;//1=adTypeBinary adodbStream.Open(); adodbStream.write(xmlHTTP.responseBody); adodbStream.SaveToFile(strLocalURL,2); adodbStream.Close(); adodbStream=null; xmlHTTP=null; } catch(e) { window.confirm("下载URL出错!"); } //window.confirm("下载完成."); } //检验连接是否有效 function getXML(URL) { var xmlhttp = new ActiveXObject("microsoft.xmlhttp"); xmlhttp.Open("GET",URL, false); try { xmlhttp.Send(); } catch(e){} finally { var result = xmlhttp.responseText; if(result) { if(xmlhttp.Status==200) { return(true); } else { return(false); } } else { return(false); } } } //POST代替FORM <SCRIPT language="VBScript"> Function URLEncoding(vstrIn) strReturn = "" For i = 1 To Len(vstrIn) ThisChr = Mid(vStrIn,i,1) If Abs(Asc(ThisChr)) < &HFF Then strReturn = strReturn & ThisChr Else innerCode = Asc(ThisChr) If innerCode < 0 Then innerCode = innerCode + &H10000 End If Hight8 = (innerCode And &HFF00) &HFF Low8 = innerCode And &HFF strReturn = strReturn & "%" & Hex(Hight8) & "%" & Hex(Low8) End If Next URLEncoding = strReturn End Function Function bytes2BSTR(vIn) strReturn = "" For i = 1 To LenB(vIn) ThisCharCode = AscB(MidB(vIn,i,1)) If ThisCharCode < &H80 Then strReturn = strReturn & Chr(ThisCharCode) Else NextCharCode = AscB(MidB(vIn,i+1,1)) strReturn = strReturn & Chr(CLng(ThisCharCode) * &H100 + CInt(NextCharCode)) i = i + 1 End If Next bytes2BSTR = strReturn End Function dim strA,oReq strA = URLEncoding("submit1=Submit&text1=中文") set oReq = CreateObject("MSXML2.XMLHTTP") oReq.open "POST","http://ServerName/VDir/TstResult.asp",false oReq.setRequestHeader "Content-Length",Len(strA) oReq.setRequestHeader "CONTENT-TYPE","application/x-www-form-urlencoded" oReq.send strA msgbox bytes2BSTR(oReq.responseBody) </SCRIPT> //readyState是xmlhttp返回数据的进度,0=载入中,1=未初始化,2=已载入,3=运行中,4=完成 //组件是否安装 isComponentInstalled("{6B053A4B-A7EC-4D3D-4567-B8FF8A1A5739}", "componentID")) //检查网页是否存在 function CheckURL(URL) { var xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); xmlhttp.Open("GET",URL, false); try { xmlhttp.Send(); var result = xmlhttp.status; } catch(e) {return(false); } if(result==200) { return true; } xmlhttp = null; return false; } //连接数据库 <script language="javascript"> //用 JavaScript 写服务器端连接数据库的代码示例 var conn = new ActiveXObject("ADODB.Connection"); conn.Open("Provider=SQLOLEDB.1; Data Source=localhost; User ID=sa; " +"Password=; Initial Catalog=pubs"); var rs = new ActiveXObject("ADODB.Recordset"); var sql="select * from authors"; rs.open(sql, conn); shtml = "<table width="100%" border=1>"; shtml +="<tr bgcolor="#f4f4f4"><td>au_id</td><td>au_lname</td><td>au_fname</td><td>phone</td><td>address</td><td> city</td><td>state</td><td>zip</td></tr>"; while(!rs.EOF) { shtml += "<tr><td>" + rs("au_id") + "</td><td>" + rs("au_lname") + "</td><td>" + rs("au_fname") + "</td><td>" + rs("phone") + "</td><td>" + rs("address") + "</td><td>" + rs("city") + "</td><td>" + rs("state") + "</td><td>" + rs("zip") + "</td></tr>"; rs.moveNext; } shtml += "</table>"; document.write(shtml); rs.close(); rs = null; conn.close(); conn = null; </script> //使用数据岛 <html> <body> srno:<input type=text datasrc=#xmldate DataFLD=srno size="76"><BR> times:<input type=text datasrc=#xmldate DataFLD=times size="76"><BR> <input id="first" TYPE=button value="<< 第一条记录" onclick="xmldate.recordset.moveFirst()"> <input id="prev" TYPE=button value="<上一条记录" onclick="xmldate.recordset.movePrevious()"> <input id="next" TYPE=button value="下一条记录>" onclick="xmldate.recordset.moveNext()"> <input id="last" TYPE=button value="最后一条记录>>" onclick="xmldate.recordset.moveLast()"> <input id="Add" TYPE=button value="添加新记录" onclick="xmldate.recordset.addNew()"> <XML ID="xmldate"> <infolist> <info ><srno>20041025-01</srno><times>null</times></info> <info ><srno>20041101-09</srno><times>2004年10月1日2点22分0秒</times></info> </infolist> </XML> </body> </html> //获得参数 <body> <a href="javascript:location.href=location.href + "?a=1&b=2"">search</a> <script language="JavaScript"> <!-- var a = location.search.substr(1); if(a.length>0) { var re = /([^&]*?)=([^&]*)/g var s = a.match(re); for(var i= 0;i<s.length;i++) { alert(s[i]); alert(s[i].split("=")[1]); } } //--> </script> </body> //可编辑SELECT <input type=text name=re_name style="width:100px;height:21px;font-size:10pt;"><span style="width:18px;border:0px solid red;"><select name="r00" style="margin-left:-100px;width:118px; background-color:#FFEEEE;" onChange="document.all.re_name.value=this.value;"> <option value="1">11111111<option> <option value="2">222222</option> <option value="3">333333</option> </select> </span> //设置光标位置 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"; } </script> //自定义提示条 <a href="#" title="这是提示">tip</a> <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("<style type="text/css"id="defaultPopStyle">"); document.write(".cPopText { background-color: #F8F8F5;color:#000000; border: 1px #000000 solid;font-color: font-size: 12px; padding-right: 4px; padding-left: 4px; height: 20px; padding-top: 2px; padding-bottom: 2px; filter: Alpha(Opacity=0)}"); document.write("</style>"); document.write("<div id="dypopLayer" style="position:absolute;z-index:1000;" class="cPopText"></div>"); 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.opacity<popOpacity) { dypopLayer.filters.Alpha.opacity+=showPopStep; tFadeOut=setTimeout("fadeOut()",1); } else { dypopLayer.filters.Alpha.opacity=popOpacity; tFadeWaiting=setTimeout("fadeIn()",tPopShow); } } function fadeIn(){ if(dypopLayer.filters.Alpha.opacity>0) { dypopLayer.filters.Alpha.opacity-=1; tFadeIn=setTimeout("fadeIn()",1); } } document.onmouseover=showPopupText; </script> //插入文字 document.onclick =function(){ var oSource = window.event.srcElement; if(oSource.tagName!="DIV") return false; var sel = document.selection; if (sel!=null) { var rng = sel.createRange(); if (rng!=null) rng.pasteHTML("<font color=red>插入文字</font>"); } } //netscapte下操作xml doc = new ActiveXObject("Msxml2.DOMDocument"); doc = new ActiveXObject("Microsoft.XMLDOM") ->> doc = (new DOMParser()).parseFromString(sXML,"text/xml") //判断键值 <html> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <head> <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; </script> </head> <body> //Javascript Document. <hr> <center> <h3>请按任意一个键。。。。</h3> </center> </body> </html> //禁止FSO 1.注销组件 regsvr32 /u scrrun.dll 2.修改PROGID HKEY_CLASSES_ROOTScripting.FileSystemObject Scripting.FileSystemObject 3.对于使用object的用户,修改HKEY_CLASSES_ROOTScripting. //省略号 <DIV STYLE="width: 120px; height: 50px; border: 1px solid blue; overflow: hidden; text-overflow:ellipsis"> <NOBR>就是比如有一行文字,很长,表格内一行显示不下.</NOBR> </DIV> //检测media play版本 <IE:clientCaps ID="oClientCaps" style="{behavior:url(#default#clientcaps)}" /> <SCRIPT> var flash=""; WMPVersion= oClientCaps.getComponentVersion("{22D6F312-B0F6-11D0-94AB-0080C74C7E95}","ComponentID"); if (WMPVersion != "") { flash = ""; var version = WMPVersion.split(","); var i; for (i = 0; i < version.length; i++) { if (i != 0) flash += "."; flash += version[i]; } document.write("您的Windows Media Player 版本是:"+flash+"<p>"); } </SCRIPT> //图象按比例 <script language="JavaScript"> <!-- //图片按比例缩放 var flag=false; function DrawImage(ImgD){ var image=new Image(); var iwidth = 80; //定义允许图片宽度 var iheight = 80; //定义允许图片高度 image.src=ImgD.src; if(image.width>0 && image.height>0){ flag=true; if(image.width/image.height>= iwidth/iheight){ if(image.width>iwidth){ ImgD.width=iwidth; ImgD.height=(image.height*iwidth)/image.width; }else{ ImgD.width=image.width; ImgD.height=image.height; } ImgD.alt=image.width+"×"+image.height; } else{ if(image.height>iheight){ ImgD.height=iheight; ImgD.width=(image.width*iheight)/image.height; }else{ ImgD.width=image.width; ImgD.height=image.height; } ImgD.alt=image.width+"×"+image.height; } } } //--> </script> <img 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 @*/ </script> //取得innerText <SCRIPT LANGUAGE="JavaScript"> <!-- var xmlDoc = new ActiveXObject("Msxml2.DOMDocument.4.0"); var currNode; xmlDoc.async = false; xmlDoc.async = false; xmlDoc.loadXML("<TABLENAME> 你好你阿三 大法 司法等四 </TABLENAME>"); currNode = xmlDoc.documentElement; var s = currNode.xml; var r = /<([^>s]*?)[^>]*?>([^<]*?)</1>/ var b = s.replace(r,"$2"); alert(b); //--> </SCRIPT> //mergeAttributes 复制所有读/写标签属性到指定元素。 <SCRIPT> function fnMerge(){ oSource.children[1].mergeAttributes(oSource.children[0]); } </SCRIPT> <SPAN ID=oSource> <DIV ID="oDiv" ATTRIBUTE1="true" ATTRIBUTE2="true" onclick="alert("click");" onmouseover="this.style.color="#0000FF";" onmouseout="this.style.color="#000000";" > This is a sample <B>DIV</B> element. </DIV> <DIV ID="oDiv2"> This is another sample <B>DIV</B> element. </DIV> </SPAN> <INPUT TYPE="button" VALUE="Merge Attributes" onclick="fnMerge()" > 以上内容可以随意转载,转载后请注名来源和出处! 原文链接:http://ttyp.cnblogs.com/archive/2004/11/15/63900.aspx <span style="border:1px solid #000000; position:absolute; overflow:hidden;" > <select style="margin:-2px;"> <option>1111</option> <option>11111111111111</option> <option>111111111</option> </select></span> //Import function Import() { for( var i=0; i<arguments.length; i++ ) { var file = arguments[i]; if ( file.match(/.js$/i)) document.write("<script type="text/javascript" src="" + file + ""></sc" + "ript>"); else document.write("<style type="text/css">@import "" + file + "" ;</style>"); } }; //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 @*/ </script> //取得innerText <SCRIPT LANGUAGE="JavaScript"> <!-- var xmlDoc = new ActiveXObject("Msxml2.DOMDocument.4.0"); var currNode; xmlDoc.async = false; xmlDoc.async = false; xmlDoc.loadXML("<TABLENAME> 你好你阿三 大法 司法等四 </TABLENAME>"); currNode = xmlDoc.documentElement; var s = currNode.xml; var r = /<([^>s]*?)[^>]*?>([^<]*?)</1>/ var b = s.replace(r,"$2"); alert(b); //--> </SCRIPT> //mergeAttributes 复制所有读/写标签属性到指定元素。 <SCRIPT> function fnMerge(){ oSource.children[1].mergeAttributes(oSource.children[0]); } </SCRIPT> <SPAN ID=oSource> <DIV ID="oDiv" ATTRIBUTE1="true" ATTRIBUTE2="true" onclick="alert("click");" onmouseover="this.style.color="#0000FF";" onmouseout="this.style.color="#000000";" > This is a sample <B>DIV</B> element. </DIV> <DIV ID="oDiv2"> This is another sample <B>DIV</B> element. </DIV> </SPAN> <INPUT TYPE="button" VALUE="Merge Attributes" onclick="fnMerge()" > 电子书制作:源码爱好者
@NotNull和@NotEmpty是常用的校验注解,用于对Java对象中的字段进行非空校验。它们的区别在于适用的数据类型不同。 @NotNull注解适用于任何数据类型,用于确保字段的值不为null。 @NotEmpty注解适用于字符串、集合或数组,用于确保字段的值不为空且长度大于零。 举个例子来说明它们的区别,假设有一个名为name的String类型字段: 1. 当name的值为null时,@NotNull注解会返回false,表示校验不通过,而@NotEmpty注解同样也会返回false。 2. 当name的值为空字符串时,@NotNull注解会返回true,表示校验通过,因为空字符串不为null,而@NotEmpty注解会返回false,表示校验不通过。 3. 当name的值为一个空格时,@NotNull注解会返回true,表示校验通过,而@NotEmpty注解同样也会返回true,表示校验通过。 4. 当name的值为"Hello World!"时,@NotNull注解会返回true,表示校验通过,而@NotEmpty注解同样也会返回true,表示校验通过,因为字符串既不为null,也不为空。 因此,@NotNull注解用于确保字段的值不为null,而@NotEmpty注解用于确保字段的值不为空且长度大于零。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* *2* [@NotNull 、@NotBlank、@NotEmpty区别和使用](https://blog.csdn.net/ybb_ymm/article/details/129020358)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"] - *3* [常用的校验注解之 @NotNull、@NotBlank、@NotEmpty 的区别](https://blog.csdn.net/weixin_49770443/article/details/109772162)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值