waynett的博客
waynett · 共 27 篇文章
JAVA类抓取IP地址
import java.net.Inet4Address; import java.net.InetAddress; import java.net.NetworkInterface; import java.util.Enumeration; public class IPAddrFetcher { public static String getIPInfo() { String trueIp = null; try { Enumeration interfaces = NetworkInterface .getNetworkInterfaces(); while (interfaces…
2012-11-12T12:40:43Z · Web前端 · 评论(0)
ie6下报Internet Explorer cannot open the Internet site 错误
ie6出现 Internet Explorer cannot open the Internet site 错误。页面中含有<base href="<%=basePath%>"> ,删除这句话,测试,成功!原因这是设置基础路径的,basepath为变量,简单的静态网页的话你设置比如:<base href=" http://www.baidu.com ">,那你下面的href属性就会以你上面设的为基准,如:<a href=" http://www.baidu.com/xxx.jsp "></a>你现在就只需要写<a href="xxx.jsp"></a>
2011-12-20T09:35:41Z · Web前端 · 评论(0)
jmpopups点击空白处 ,弹出层就会消失的问题
$("#popupLayerScreenLocker").click(function() { $.closePopupLayer(); }); 将上面的代码屏蔽掉就可以解决
2011-11-03T16:37:54Z · Web前端 · 评论(0)
点击回车取得当点焦点所在控件的ID
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD> <TITLE> New Document </TITLE> <META NAME="Generator" CONTENT="EditPlus"> <META NAME="Author" CONTENT=""> <META NAME="Keywords" CONTENT=""> <META NAME="Description" CONTENT=""> <script type="text/javascript"> document.onkey…
2011-09-22T11:04:48Z · Web前端 · 评论(0)
正则判断时间是否正确(时和分)
/^(?:(?:[0-2][0-3])|(?:[0-1][0-9])):[0-5][0-9]$/;
2011-08-23T11:31:01Z · Web前端 · 评论(0)
jmpopups与chickbox(带有附件可下载直接查看效果)
index.html <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <script type="text/javascript" src="jquery-1.…
2011-08-05T15:47:25Z · Web前端 · 评论(0)
http post 发送xml数据
package WCDMAVideoHttpClient; import java.io.IOException; import java.io.UnsupportedEncodingException; import org.apache.commons.httpclient.HttpClient; import org.apache.commons.httpclient.HttpException; import org.apache.commons.httpclient.methods.PostMethod; import org.apache.commons.httpclient.m…
2011-07-21T11:41:30Z · Web前端 · 评论(0)
DOM、SAX、DOM4J、JDOM、StAX生成XML并返回XML字符串形式(转自http://dreams75.iteye.com/blog/512319)
import java.io.BufferedWriter; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.FileWriter; import java.io.IOException; import java.io.OutputStreamWriter; import java.io.PrintWriter; import java.io.StringWriter; import java.io.UnsupportedEncodingException; impor…
2011-07-21T11:37:52Z · Web前端 · 评论(0)
java jdom 生成xml文件,并备份文件
import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.text.DateFormat; import java.util.Date; /** * * * @author Administrator * @Dat…
2011-07-19T15:19:40Z · Web前端 · 评论(0)
倒计时
var left_1 = '260'; // 剩余时间,秒为单位 setTime_1(); function setTime_1() { if (left_1) { left_1 --; if(left_1 > 0) { var hour = Math.floorleft_1 / 3600); hour = (hour < 10) ? ('0' + hour) : hour; var minute = Math.floor((left_1 % 3600) / 60); minute = (minute < 10) ? ('0' + minute) : minute; var second =…
2011-06-16T14:05:08Z · 编程语言 · 评论(0)
关于sqlserver数据库的时间问题
DATEADD(mi, - 30, GETDATE()) DATEDIFF(mi,loginTime,GETDATE()) yyyy 年 q 季度 m 月 y 一年的日数 d 日 w 一周的日数 ww 周 h 小时 n 分钟 s 秒
2011-06-07T15:03:48Z · 数据库 · 评论(0)
jquery ajax json 模态对话框
public JSONArray findPrettyRuleByName(String prettyRuleName, String wllx, ServletContext ctx) throws Exception { RootDaoInterface dao = DataSourceHelper.getDaoInterfae(ctx); String sql = "select id,zdxf,zxsc,ychf,name from tb_entity_lianghaoleixing where name like '%" + prettyRuleName + "%' and wll…
2011-05-17T09:25:47Z · 编程语言 · 评论(0)
点击按钮上下滚动
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <title>无标题文档</title> <style type="text/css"> ul,li{marg…
2011-05-13T15:26:54Z · 编程语言 · 评论(0)
给页面定位
function changeFocus(divId) { var pos = getElementPos(divId); //要定位的对象这里是个Div window.scroll(pos.x,pos.y); } function getElementPos(elementId) { var ua = navigator.userAgent.toLowerCase(); var isOpera = (ua.indexOf('opera') != -1); var isIE = (ua.indexOf('msie') != -1 && !isOpera); // not opera spoo…
2011-04-13T16:08:20Z · 编程语言 · 评论(0)