`
文章列表
//声明一个javascript对象: var a = {}; //声明一个函数对象: var a = function(){} //声明静态对象 var a = { name : "静态对象", getName : function(){ return this.name; } }; alert(a.getName());//外部调用 //函数对象的封装与继承 function A(name){ var id = 'id';//私有属性,不可继承,外部无法调用 this. ...
/** 在CSS文件里,有时要用到background,即加一个背景图片,一般在做按钮样式时会经常用到。 css中加背景图片根据图片及css文件的相对位置分一下几种类型: 1.同包下:background : url(aaa.gif); 2.不同包: 在这种情况下有2中方法可以设置,一种是使用绝对路径,即http://www.iteye.com/aaa.gif这种,不过一般不推荐这么用,不利于项目移植;一种是使用相对路径,首先需要找到图片文件和css文件共同的一个根目录,然后再加上图片的子目录,比如: css文件位置:WebRoot/test/css/a.css ...
引自:http://www.cnblogs.com/xbudong/articles/1509622.html $.extend({ includePath: '', include: function(file) { var files = typeof file == "string" ? [file] : file; for (var i = 0; i < files.length; i++) { var name = files[i].repla ...
/** * 通过给定的class解析类名(给定类名则直接返回) * @author cuiweiqing 2011-10-9 * @param clzss class对象 * @return 类名 */ function getClassName(clzss){ if(typeof clzss == "string"){ return clzss; } var s = clzss.toString(); if(s.indexOf('function') == -1){ return null; }else{ s ...
转自:http://tech.ddvip.com/2009-03/1237461188111813.html   关键字:   Swing 皮肤管理器 第三方皮肤库   准备工作:   新建一个项目,使用SWT-Designer或者Netbeans的可视化编辑器设计一个登陆窗口。   内容:Swing允许选择 ...
1.开机按【F1】进入【BOIS】设置界面 2.在上面的导航页选择【CONFIG】 3.点开 【Keyboard/Mouse】选项 4.点选 【Change to "F1-F12 keys"】设置为 【Legacy】 5.保存后重启
Date类学习总结  1.计算某一月份的最大天数 Calendar time=Calendar.getInstance();time.clear();time.set(Calendar.YEAR,year); //year 为 int time.set(Calendar.MONTH,i-1);//注意,Calendar对象默认一月为0           int day=time.getActualMaximum(Calendar.DAY_OF_MONTH);//本月份的天数注:在使用set方法之前,必须先clear一下,否则很多信息会继承自系统当前时间 2.Calendar和Date ...

CSS小技巧集合

  <!-- css+DIV里面是文字和图片居中对齐 --> <img src='aaa.jpg' style='vertical-align:text-bottom;'/>  /** div文字过长自动处理成省略号 */ div{ width : 100px; write-space : nowarp; overflow : hidden; text-overflow : ellipsis; }
function AAA(id){//创建对象 this.id=id; this.test = function(){ var obj = this;//重点,先用变量接受本对象 ActionMgr.post('test.action','test',function(request, result){//模拟回调函数 alert(obj.id);//正确写法 //alert(this.id);//这是错误写法,这样写得到的结果是undefined }); } ...
public BigDecimal setScale(int newScale, RoundingMode roundingMode)返回 BigDecimal,其标度为指定值,其非标度值通过此 BigDecimal 的非标度值乘以或除以十的适当次幂来确定,以维护其总值。如果该操作减少标度,则非标度值必须被除(而不是乘),并且该值可以更改;在这种情况下,将指定的舍入模式应用到除法中。 参数: newScale - 要返回的 BigDecimal 值的标度。 roundingMode - 要应用的舍入模式。 返回: ...
//String custom="#,###,00"; //String custom="#,###,00.00"; String custom="00.00%";//注意 若为百分比 则数字需先处以100 //...... double d = 1112312323.123123; DecimalFormat df = new DecimalFormat(custom); String text = df.format(d); System.err.println(text);  
有的时候我们会将控件对象传到javascript中以方便我们获得控件附带的属性:如 <input type='button' value='button' onclick='test(this)' />  有的时候还会在此基础上操作该控件对象的css,操作方法如下: function test(obj){ obj.style['border']='1px solid red';//将边框样式改为红色加粗 obj.style.border='1px solid red';//效果和上面一样 }   
1t = 15px; //缇是像素的15倍  
package org.signsmile;   import java.awt.Color;   public class ColorConverter {   public static Color String2Color(String str) {   int i = Integer.parseInt(str.substring(1),16);   return new Color(i);   }   public static String Color2String(Color color) {   String R = Integer.toHexString(co ...
if(document.mylist.length != "undefined" ) {} 这个用法有误. 正确的是 if( typeof(document.mylist.length) != "undefined" ) {} 或 if( !isNaN(document.mylist.length) ) {} typeof的运算数未定义,返回的就是 "undefined". 运算数为数字 typeof(x) = "number" 字符串 typeof(x) = "string" 布尔值 typeo ...
Global site tag (gtag.js) - Google Analytics