`
文章列表
1.封装 function Car(sColor,iDoors,iMpg){       this.color = sColor;       this.doors = iDoors;       this.mpg   = iMpg;       this.drivers = new Array("Mike","Sue");        if(typeof Car._initialized == "undefined"){                    Car.prototype.showColor = function ...
private String subStr(String str, int max){ int sum = 0; if(str!=null && str.length()> max){ StringBuilder sb = new StringBuilder(max); for (int i = 0; i < str.length(); i++) { int c = str.charAt(i); if((c & 0xff00) != 0) sum+=2; else sum+=1; ...
Referrer的重要性 HTTP请求中有一个referer的报文头,用来指明当前流量的来源参考页。例如在 www.sina.com.cn/sports/上点击一个链接到达cctv.com首页,那么就referrer就是www.sina.com.cn /sports/了。在Javascript中,我们可以通过document.referrer来获取同样的信息。通过这个信息,我们就可以知道访客是 从什么渠道来到当前页面的。这对于Web Analytics来说,是非常重要的,这可以告诉我们不同渠道带来的流量的分布情况,还有用户搜索的关键词等,都是通过分析这个referrer信息来 获取的。 但是 ...
1. debugger;   在firefox的firebug下调试时,js会自动在这行上加上一个断点 2. window.console.log('This is log message');    window.console.debug('This is debug message');    //window.console.error('This is error message');    window.console.info('This is info message');    window.console.warn('This is warning message'); 3. ...
1.插件js var itemId=""; var showDivId=""; //控制层居中显示 function center(id){ var o = document.getElementById(id); o.style.display = 'block'; var s = { position:'absolute', top:'50%', left:'50%', margin:o.offsetHeight/-2+(document.bod ...
<a style="cursor:pointer" title="aaa" href="#"></a> 2.html页面跳转   <html> <head> <meta content="0;url=http://www.chm-pdf.com" http-equiv="refresh" /> </head> <body> </body> </html>
//验证是否为空   function check_blank(obj, obj_name){         if(obj.value != ''){                  return true;           }else{               alert(obj_name + "所填不能为空!");             obj.value = "";            return false;           }      }     //过滤输入字符的长度   function che ...
IE默认首页被修改的故障排除。 IE浏览器上方的标题栏被改成“欢迎访问……网站”的样式,这是最常见的篡改手段,受害者众多。排除办法可通过修改注册表来解决: ①在Windows启动后,点击“开始”→“运行”菜单项,在“打开”栏中键入regedit,然后按“确定”键; ②展开注册表到HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\Main下,在右半部分窗口中找到串值“Start Page”双击 ,将Start Page的键值改为“about:blank”即可; ③同理,展开注册表到HKEY_CURRENT_USER\Softwa ...
1.宏学习   定义:   <#macro prom pid> <#if pid=="1">     。。。。。。。。。。。。。。             </#if>   </#macro>   其它页面中引入:   <#import "/products/choice_size.html" as productSize>   在页面中使用:   <@productSize.prom pid="${product.templateId!}"/> 2.时间转 ...
<script language="javascript">   function changeFocus(){    if(event.keyCode==13 && event.srcElement.type!='submit')    event.keyCode=9;   }   document.onkeydown= changeFocus; </script> <body> <form action="2.jsp"> <input type="t ...
<html> <head>       <title>收藏2010-6-13</title> </head> <body> <a href="#" onclick="addfavorite()">加入收藏夹</a><br/> <a href="#" onclick=document.execCommand("open")>打开</a><br/> <a href=&q ...
1.第一种 public class User implements Comparable<User>{     private String name;     private Integer order;     public String getName() {         return name;     }     public void setName(String name) {         this.name = name;     }     public Integer getOrder() {         return order ...
1、 case when else end select name 姓名,case sex when boy then 男 else 女 end from student; select name 姓名,case age when 20 then 青年 when 30 then 中年 when 60 then 老年 else 其它 end from age_tbl; 2、 if exists if not exists not exists if not Exists(select * from Tab1 where name= '') insert into T ...
一、%tomcat%\conf\目录下server.xml中添加     <Host name="www.jshop.net" appBase="webapps" unpackWARs="false"   autoDeploy="false" xmlValidation="false"               xmlNamespaceAware="false"> </Host> 其中www.jshop.net为工程名,不用覆盖原有的<host ...
import java.util.Properties;       Properties props=System.getProperties(); //获得系统属性集    String osName = props.getProperty("os.name"); //操作系统名称    String osArch = props.getProperty("os.arch"); //操作系统构架    String osVersion = props.getProperty("os.version"); //操作系统版本 ...
Global site tag (gtag.js) - Google Analytics