博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2012年9月24日

摘要: 做web开发遇到的小问题,记录下来问题描述页面div与顶部有缝隙问题如图:HTML代码:@{ Layout = null;}<!DOCTYPE html><html><head> <title>Top</title></head><body> <div> <a href="" class="logout"> <img onclick="LogOutJson();" src="http://www.cnblogs. 阅读全文

posted @ 2012-09-24 13:57 Wuqh 阅读(1495) 评论(0) 推荐(0) 编辑

2012年9月21日

摘要: 以下为让div显示在浏览器正中间的样式<style type="text/css"> #centerdiv { position:absolute; <!--这个属性是设置div以绝对位置显示-->top:50%; <!--在离顶部50%的位置显示-->left:50%; <!--在离左边50%的位置显示-->margin:-150px 0 0 -100px; <!--这个设置大家开始一看,可能觉得好像不是很明白,在下面为大家详细讲解--> width:300px; height:200px;background: 阅读全文

posted @ 2012-09-21 09:42 Wuqh 阅读(1261) 评论(2) 推荐(0) 编辑

2012年8月18日

摘要: <!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=gb2 阅读全文

posted @ 2012-08-18 10:01 Wuqh 阅读(8351) 评论(0) 推荐(1) 编辑

2012年7月30日

摘要: json 返回数据时间的绑定的转换function ChangeDateFormat(dateTime) { var date = new Date(parseInt(dateTime.replace("/Date(", "").replace(")/", ""), 10)); var month = date.getMonth() + 1 < 10 ? "0" + (date.getMonth() + 1) : date.getMonth() + 1; var currentDate = 阅读全文

posted @ 2012-07-30 11:33 Wuqh 阅读(1615) 评论(2) 推荐(2) 编辑

2012年7月28日

摘要: Jquery 调用 Json前台代码 Jqueryfunction ApplyDelay(objID, thisobj) { if (confirm("你确定要删除该资源")) { var id = objID; var helptime = new Date().getTime(); $.getJSON('/WorkDelay/ApplyDelay/', { did: id, helptime: helptime }, function(returndata) { if (returndata) { alert("删除成功!"); $( 阅读全文

posted @ 2012-07-28 10:51 Wuqh 阅读(166) 评论(0) 推荐(0) 编辑

2012年7月5日

摘要: short 转byte[] int temp = val;byte[] bt=new byte[2];for (int i = 0; i < 2; i++){ bt[i]=new Integer(temp & 0xff).byteValue();// 将最低位保存在最低位 temp = temp >> 8; // 向右移8位}int转byte[] int temp = v;byte[] bt = new byte[4];for (int i = 0; i < bt.length; i++){bt[i] = new Integer(temp & 0xff) 阅读全文

posted @ 2012-07-05 16:05 Wuqh 阅读(524) 评论(0) 推荐(0) 编辑

2012年5月29日

摘要: C#格式化数值结果表字符说明示例输出C货币string.Format("{0:C3}", 2)$2.000D十进制string.Format("{0:D3}", 2)002E科学计数法1.20E+0011.20E+001G常规string.Format("{0:G}", 2)2N用分号隔开的数字string.Format("{0:N}", 250000)250,000.00X十六进制string.Format("{0:X000}", 12)Cstring.Format("{0:000. 阅读全文

posted @ 2012-05-29 00:21 Wuqh 阅读(125) 评论(0) 推荐(0) 编辑

2011年11月28日

摘要: 收集了一些记录下来,这些有的是从网上找的,有些是自己使用到的,记录下来,以后方便查找datetime dt = datetime.now;dt.tostring(); //2005-11-5 13:21:25dt.tofiletime().tostring(); //127756416859912816dt.tofiletimeutc().tostring(); //127756704859912816dt.tolocaltime().tostring(); //2005-11-5 21:21:25dt.tolongdatestring().tostring(); //2005年11月5日dt 阅读全文

posted @ 2011-11-28 09:57 Wuqh 阅读(150) 评论(0) 推荐(0) 编辑

2011年11月18日

摘要: ///<summary> /// 字符串形式的十六进制转换成byte[] ///</summary> ///<param name="str"></param> ///<returns></returns> private byte[] StringToHex(string str) { string[] strs = str.Split(''); byte[] bytes = new byte[strs.Length]; ... 阅读全文

posted @ 2011-11-18 20:35 Wuqh 阅读(506) 评论(0) 推荐(1) 编辑