2012年8月6日

摘要: 当测试人员检测文本框中连续输入非数字时,我以前写的只能输入数字的javascript就没有用了,对于我先前写的方法,只是针对我只输入一个非数字时.如果一直按键盘不放开一直往里写非数字那就出现错误了.后来试了各种方法. 我想说的是一种我认为很好的方法: <input onkeyup="this.value=this.value.replace(/\D/g,'')" onafterpaste="this.value=this.value.replace(/\D/g,'')"> 很不错input高级限制级用法.取消按 阅读全文
posted @ 2012-08-06 21:21 wboweb 阅读(177) 评论(0) 推荐(0) 编辑

2012年7月26日

摘要: declare @i intset @i=1while @i<30begininsert into test (userid) values(@i)set @i=@i+1end来源:http://www.cnitblog.com/malan11/articles/31153.html 阅读全文
posted @ 2012-07-26 16:48 wboweb 阅读(144) 评论(0) 推荐(0) 编辑

2012年7月11日

摘要: 新建一个DeskTopService的Wcf服务web.config配置如下:(测试可以用)<?xml version="1.0" encoding="utf-8"?><configuration> <connectionStrings> <add name="TestConnectionString" connectionString="Data Source=.;Database=test;Uid=test;Pwd=test;" providerName="S 阅读全文
posted @ 2012-07-11 16:12 wboweb 阅读(4116) 评论(0) 推荐(0) 编辑

2012年7月10日

摘要: USE [MyDataBase]GO/****** Object: StoredProcedure [dbo].[GetVipDetails] Script Date: 07/05/2012 09:39:14 ******/SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGOALTER Proc [dbo].[GetVipDetails] @pageindex int=1 , @pagesize int=10, @VipAccount nvarchar(20)=null, --VIP账户 @VipCompanyUserI... 阅读全文
posted @ 2012-07-10 17:54 wboweb 阅读(221) 评论(0) 推荐(0) 编辑
摘要: return Encoding.UTF8.GetString(Convert.FromBase64String(Base64string)); 阅读全文
posted @ 2012-07-10 13:42 wboweb 阅读(595) 评论(0) 推荐(0) 编辑
摘要: using System;using System.Security.Cryptography;using System.Text;using System.IO;/// <summary>/// DES加密/解密类。/// </summary>public class DESEncryptEx1{ #region ========加密======== /// <summary> /// 加密 /// </summary> /// <param name="pToEncrypt">要加密的内容</param& 阅读全文
posted @ 2012-07-10 13:38 wboweb 阅读(3996) 评论(0) 推荐(0) 编辑

2012年6月26日

摘要: jQuery获取Select选择的Text和Value:语法解释:1. $("#select_id").change(function(){//code...}); //为Select添加事件,当选择其中一项时触发2. var checkText=$("#select_id").find("option:selected").text(); //获取Select选择的Text3. var checkValue=$("#select_id").val(); //获取Select选择的Value4. var check 阅读全文
posted @ 2012-06-26 17:41 wboweb 阅读(13775) 评论(0) 推荐(2) 编辑
摘要: redio //取值 var item = $("input[name=radio_name]:checked").val(); 或 $("input[name='radio_name']:checked").val(); 或 $("[name='radio_name'][checked]").val(); //取有checked的值 var rediovalue= $("input[type=radio]:checked]").val(); //设置value=2的项目为当前选中项 阅读全文
posted @ 2012-06-26 17:40 wboweb 阅读(276) 评论(0) 推荐(0) 编辑
摘要: //可以输入一个小数点,和可以使用退格function moneyInput(handle){ var key = event.keyCode; if( (key > 95 && key < 106) ||(key > 47 && key < 60) || (key == 9) || (key == 46) || (key >= 37 && key <= 40) ||(key == 110 && handle.value.indexOf(".") < 0 )|| (ke 阅读全文
posted @ 2012-06-26 17:39 wboweb 阅读(247) 评论(0) 推荐(0) 编辑
摘要: var myDate = new Date();myDate.getYear(); //获取当前年份(2位)myDate.getFullYear(); //获取完整的年份(4位,1970-????)myDate.getMonth(); //获取当前月份(0-11,0代表1月)myDate.getDate(); //获取当前日(1-31)myDate.getDay(); //获取当前星期X(0-6,0代表星期天)myDate.getTime(); //获取当前时间(从1970.1.1开始的毫秒数)myDate.getHo... 阅读全文
posted @ 2012-06-26 17:37 wboweb 阅读(197) 评论(0) 推荐(0) 编辑

导航