上一页 1 ··· 5 6 7 8 9 10 11 下一页

js 检查图像文件格式 by zhouwillpower

摘要: function IfPicType(filename,title) { var filetype; var filename; filename = Alltrim(filename); filetype = filename.substr(filename.lastIndexOf("."),filename.length-1); if(filetype.toUpperCase()!=".GIF"&&filetype.toUpperCase()!=".BMP"&&filetype.toUpperCase()!=".JPEG"&&filetype.toUpperCase()!=".JPG") { window.alert(title+"\n为不支持的上传文件格式!");return false; } return true; } 阅读全文
posted @ 2006-06-24 12:35 zhouwillpower 阅读(437) 评论(0) 推荐(0)

js检查中文字符 by zhouwillpower

摘要: function IsHanZi(strHanZi) { if(!strHanZi) return; if(strHanZi=='') return; var PatSWord=/^[\x00-\xff]+$/; //匹配所有单字节长度的字符组成的字符串 var PatDWord=/[^\x00-\xff]+/g; //匹配双字节长度的字符组成的字符串 if(!PatSWord.test(strHanZi)) return true; return false; } 阅读全文
posted @ 2006-06-24 12:33 zhouwillpower 阅读(570) 评论(0) 推荐(0)

js 移出空格 by zhouwillpower

摘要: replace(/(^\s*)|(\s*$)/g, "") 阅读全文
posted @ 2006-06-24 12:32 zhouwillpower 阅读(147) 评论(0) 推荐(0)

创建自定义配置节 by zhouwillpower

摘要: 您可以用自己的 XML 配置元素来扩展标准的 ASP.NET 配置设置集。若要完成该操作,您必须创建自己的配置节处理程序。 该处理程序必须是一个用来实现 System.Configuration.ConfigurationSection 类的 .NET Framework 类。 添加您自己的代码,以执行所需的配置工作。 using System; using System.Collections; using System.Text; using System.Configuration; using System.Xml; namespace MyConfigSectionHandler { public class MyHandler : ConfigurationSection { public MyHandler() { } pub 阅读全文
posted @ 2006-06-24 12:19 zhouwillpower 阅读(501) 评论(1) 推荐(0)

使用编程方式访问系统配置 by zhouwillpower

摘要: 转自(http://msdn2.microsoft.com/zh-CN/library/4c2kcht0.aspx) 可以从 ASP.NET 应用程序或 .NET 客户端应用程序内部访问运行时配置设置。每个配置节都具有其各自的对象类型,对于 C#,在调用 WebConfigurationManager 类的方法时,需要对这些对象类型进行强制转换。 string configPath = "/MyAppRoot"; // Get the configuration object to access the related Web.config file. Configuration config = WebConfigurationManager.OpenWebConfiguration(configPath); // Get the object related to the section. 阅读全文
posted @ 2006-06-24 12:18 zhouwillpower 阅读(186) 评论(0) 推荐(0)
上一页 1 ··· 5 6 7 8 9 10 11 下一页