`
文章列表
<body  onkeydown="if (event.keyCode==13) {document.all.button2.click()}">         下面的五种方法都可以帮你解决这种问题1.<script language=javascript>function document.onkeydown(){   if (event.keyCode == 13)   {          if (event.srcElement == document.getElementById('<%=txtEmpCode.ClientID%> ...
function checkCH(){ var str=txtPwd.value; var c = /[\u4e00-\u9fa5]/; if(c.test(str)) {  alert("不能输入中文。");  return false; } return true;}
由于项目的需要不允许系统在提交之后,按IE的后退按钮进行再次提交。试试了一下在 .NET中通过如下语句 Response.Cache.SetCacheability(System.Web.HttpCacheability.NoCache);就可以使页面的缓存失效,每次都需要获取新页面。   <script>history.forward();</script>最灵!
常用javascript函数(一)  作者: 无名 类别: HTML/JavaScript 日期: 2001-11-11 21:19:11   /********************************************************************************** EO_JSLib.js* javascript正则表达式检验**********************************************************************************/ //校验是否全由数字组成function isDigit(s) ...
经常在网络上四处载东西,有时碰到直接拷贝一个类似http://193.100.100.56/TestWebSolution/WebApplication1/test.rar地址准备下载test.rar文件时,却被告知没有登录或者直接跳转到其他页面的情况,然后等登录后直接下载该文件。要实现上面情况,在.NET世界里是比较容易的。 1、  首先创建一个类库项目ClassLibrary1,实现如下(点这里查看): using System; using System.Web;    // 引用System.Web组件   namespace ClassLibrary1 {     public cla ...
Response.Write("<script language='javascript'>window.opener.location=window.opener.location.href;</script>") 第一种方案是:file a.htm function OpenDialog(url,param){return window.open(url,param, "DialogWidth:450px;DialogHeight:450px;help:no;status:no");} file b.htm<script ...
作者:网际浪子专栏(曾用名littlehb)  http://blog.csdn.net/littlehb/上传图片,要求图片200100象素,大小小于2M,如果图片不符合要求,不能上传,否则上传图片,上传以后对图片按系统日期动态命名,保留路径到数据库里。 private void Button1_Click(object sender, System.EventArgs e)  {   if(File1.PostedFile.ContentType.ToUpper().IndexOf("IMAGE")>-1)   {    System.Drawing.Image i ...
<EMBED SRC="MY_LIFE.RPM" WIDTH=300 HEIGHT=134 > Tip:SRC是可以省略的,当mime Type 参数如下时: <EMBED ...,TYPE="audio/x-pn-realaudio-plugin",...>,这样做会产生不可预料的结果,因此强烈推荐你包含SRC属性, 并且提供一个空的文件的文件名。
将一些HTML替换掉 eg:strContent=strContent.Replace("&","&amp");strContent=strContent.Replace("'","''");strContent=strContent.Replace("<","&lt");strContent=strContent.Replace(">","&gt");strContent=strContent ...
Response.Write("<script>window.opener=null;window.close();</script>")  ;
public static long DirSize(DirectoryInfo d)     {            long Size = 0;            // Add file sizes.        FileInfo[] fis = d.GetFiles();        foreach (FileInfo fi in fis)         {                  Size += fi.Length;            }        // Add subdirectory sizes.        DirectoryInfo[] dis = ...
如何得到数据库中所有表字段及字段中文描述以下资料,通过csdn的一位师兄从SQL版主那得到:sql中SELECT  (case when a.colorder=1 then d.name else '' end) N'表名', a.colorder N'字段序号', a.name N'字段名', (case when COLUMNPROPERTY( a.id,a.name,'IsIdentity')=1 then '√'else '' end) N'标识', (case when (SELECT count(*) FROM sysobjects WHERE (name in           ...
作者:网际浪子专栏(曾用名littlehb)  http://blog.csdn.net/littlehb/ CREATE PROCEDURE LoginUser  @loginUN char(50) OUTPUT,  @loginPW char(40)ASif @loginPW = (select [password] from users where username=@loginUN)  return 0;else  return -1; GO 要loginUN返回值,把它定义成OUTPUT的,相应的SqlCommand的参数定义里也定义也ParameterDirect.InputOutp ...
<asp:RegularExpressionValidator id="revTextBox1" runat="server" ForeColor="Red" Display="Dynamic" ControlToValidate="textBox1" ValidationExpression="(\w|\W){1,100}">格式错误-只能输入不超过100个字符</asp:RegularExpressionValidator>
作者:网际浪子专栏(曾用名littlehb)  http://blog.csdn.net/littlehb/在域控制器或备份域控制器上安装  Microsoft  Visual  Studio  .NET  或  Microsoft  .NET  框架后,如果您尝试运行  ASP.NET  应用程序,则浏览器会显示下面的错误信息:   Server  Application  Unavailable   The  web  application  you  are  attempting  to  access  on  this  web  server  is  currently  un ...
Global site tag (gtag.js) - Google Analytics