`
alvinqq
  • 浏览: 181037 次
  • 性别: Icon_minigender_1
  • 来自: 深圳
社区版块
存档分类
最新评论
文章列表
<!-- Struts2.0中的<s:beanname="org.apache.struts2.util.Counter">可以像for循环一样使用,<s:param name="first" value="1"></s:param><s:param name="last" value="10"/> 相当于for(int i=1;i<10;i++) Column是类中设置的字段值,current相当于for中的i,通过改变20可以控制表格 ...

DOM解析XML

    博客分类:
  • java
public class Test_DOM {     public static void main(String[] args)         throws ParserConfigurationException, SAXException, IOException     {         DocumentBuilderFactory builderFactory = DocumentBuilderFactory.newInstance();         DocumentBuilder builder = builderFactory.newDocumentBuilder(); ...

文件下载

    博客分类:
  • java
/** * 下载文件 * @param filePath 文件路径 * @param fileName 文件名 * @see [类、类#方法、类#成员] */ public void downLoad(String filePath, String fileName) { ServletOutputStream out = null; BufferedInputStream bis = null; BufferedOutputStream bos = null ...
/** * * 国际化文件的读取 * <功能详细描述> * @author zengqiang * @version [版本号, 2009-8-18] * @see [相关类/方法] */ public class Internationalization { private static Map<String, String> languageMap = new HashMap<String, String>(); private static String PATH = null; ...
public class UdpRecv { /** Socket接收消息(先启动接收端) * <功能详细描述> * @param args * @throws Exception * @see [类、类#方法、类#成员] */ public static void main(String[] args) throws Exception { //端口号要是发送方对应的端口号 DatagramSocket ds = new DatagramSocket( ...

Cookie的操作

/** * 取得cookie中的信息 * @param name cookie的name */ function getCookie(name) { var start = document.cookie.indexOf(name + "="); var len = start + name.length + 1; if ( ( !start ) && ( name != document.cookie.substring(0, name.length))) { ...
//浏览器的判断 brower = function() { var ua = navigator.userAgent.toLowerCase(); var os = new Object(); os.isFirefox = ua.indexOf ('firefox') != -1; os.isOpera = ua.indexOf ('opera') != -1; os.isChrome = ua.indexOf ('chrome') != -1; os.isIE = !os.isOpera && ua.indexOf ('msie') ...
1. childNodes在ff中和ie的区别。 ff中的node(nodeType = 1)都是用textNode(nodeType = 3)分开的,而ie/op不是这样的。 content 在ff下,box1的childNodes为3个,ie下为1个。 2. 设置某个node对象的style class名称。 ie中要设置某个node的class用”className”作为attr来set或者get。 ff等其它的浏览器用”class”作为attr来set或者get。 代码: if(typeof node1.getAttribute(”className”) == “string”) { … ...
<SCRIPT  LANGUAGE="JavaScript">  <!--  var  swf  =  new  ActiveXObject('ShockwaveFlash.ShockwaveFlash');  (swf)  ?  document.writeln('你已经安装了插件')  :  document.writeln('你没有安装插件');  //  -->  </SCRIPT> 动态加载. <OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553 ...
Global site tag (gtag.js) - Google Analytics