摘要: 转载,但是忘记地址了。26. 显示或者删除输入框的缺省值//This snippet will show you how to keep a default value//in a text input field for when a user hasn't entered in//a value to replace itswap_val = [];$(".swap").each(function(i){swap_val[i] = $(this).val();$(this).focusin(function(){if ($(this).val() == swap 阅读全文
posted @ 2013-03-19 16:40 jasonzhou 阅读(778) 评论(0) 推荐(1) 编辑
摘要: 转载,但是忘记地址了。1. 创建一个嵌套的过滤器.filter(":not(:has(.selected))") //去掉所有不包含class为.selected的元素2. 重用你的元素查询var allItems = $("div.item"); var keepList = $("div#container1 div.item"); <div>class names: $(formToLookAt + " input:checked").each(function() { keepListkeepL 阅读全文
posted @ 2013-03-19 16:32 jasonzhou 阅读(345) 评论(1) 推荐(1) 编辑
摘要: 1. Strings转int和int转StringString a = String.valueOf(2); //integer to numeric stringint i = Integer.parseInt(a); //numeric string to an int2.在文件内追加文字BufferedWriter out = null;try { out = new BufferedWriter(new FileWriter(”filename”, true)); out.write(”aString”);} catch (IOException e) { // ... 阅读全文
posted @ 2013-03-19 11:30 jasonzhou 阅读(6121) 评论(0) 推荐(0) 编辑
摘要: /* * This code is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This code is distributed in the hope .. 阅读全文
posted @ 2013-03-19 10:38 jasonzhou 阅读(1344) 评论(0) 推荐(0) 编辑