<?xml version="1.0" encoding="UTF-8"?>
  <feed xmlns="http://www.w3.org/2005/Atom">
  <title type="html"><![CDATA[梦的热土]]></title>
  <subtitle type="html"><![CDATA[专注IT技术，因为有梦才会执着，因为有热土梦才会长大]]></subtitle>
  <id>http://www.mdrt.org.cn/</id>
  <link rel="alternate" type="text/html" href="http://www.mdrt.org.cn/" /> 
  <link rel="self" type="application/atom+xml" href="http://www.mdrt.org.cn/atom.asp" /> 
  <generator uri="http://www.pjhome.net/" version="2.8">PJBlog3</generator> 
  <updated>2010-06-17T13:24:02+08:00</updated>

  <entry>
	  <title type="html"><![CDATA[Access通用类（适合不断变化数据库名的项目）]]></title>
	  <author>
		 <name>jbkadmin</name>
		 <uri>http://www.mdrt.org.cn/</uri>
		 <email>anyshe@126.com</email>
	  </author>
	  <category term="" scheme="http://www.mdrt.org.cn/default.asp?cateID=6" label="网页脚本类" /> 
	  <updated>2010-06-17T13:24:02+08:00</updated>
	  <published>2010-06-17T13:24:02+08:00</published>
		  <summary type="html"><![CDATA[最近网站基本上都是用到了Access，后来发现几乎都要用到该数据库，因为和软件有一些联系，所以打算自己改一个AccessDBHelpser出来方便以后的开发，最后确定了一个适合一个项目就一个access数据库的情形，同时也适用于一个项目中不断上传access数据库的项目，该读取哪一个 access成了一个小小的难题，下面把代码贴出：<br/>代码<br/>using System;<br/>using System.Data;<br/>using System.Configuration;<br/>using System.Linq;<br/>using System.Web;<br/>using System.Web.Security;<br/>using System.Web.UI;<br/>using System.Web.UI.HtmlControls;<br/>using System.Web.UI.WebControls;<br/>using System.Web.UI.WebControls.WebParts;<br/>using System.Xml.Linq;<br/>using System.Data;<br/>using System.Data.OleDb;<br/>using System.Data.SqlClient;<br/><br/>/// &lt;summary&gt;<br/>///AccessDBHelper 的摘要说明<br/>/// &lt;/summary&gt;<br/>public class AccessDBHelper<br/>{<br/>&nbsp;&nbsp;&nbsp;&nbsp;private&nbsp;&nbsp;string connectionString = &#34;Provider=Microsoft.Jet.OleDb.4.0;Jet Oledb:Database Password=mingmei114;Data Source=&#34;;<br/>&nbsp;&nbsp;&nbsp;&nbsp;<br/>&nbsp;&nbsp;&nbsp;&nbsp;public AccessDBHelper()<br/>&nbsp;&nbsp;&nbsp;&nbsp;{<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br/>&nbsp;&nbsp;&nbsp;&nbsp;}<br/>&nbsp;&nbsp;&nbsp;&nbsp;public AccessDBHelper(string AsaFilePath)<br/>&nbsp;&nbsp;&nbsp;&nbsp;{<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;connectionString += AsaFilePath;<br/>&nbsp;&nbsp;&nbsp;&nbsp;}<br/>&nbsp;&nbsp;&nbsp;&nbsp;private&nbsp;&nbsp;OleDbConnection connection;<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;public&nbsp;&nbsp;OleDbConnection Connection<br/>&nbsp;&nbsp;&nbsp;&nbsp;{<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;get <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (connection == null)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;connection = new OleDbConnection(connectionString);<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;connection.Open();<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;else if (connection.State == System.Data.ConnectionState.Closed)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;connection.Open();<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;else if (connection.State == System.Data.ConnectionState.Broken)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;connection.Close();<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;connection.Open();<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return connection;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br/>&nbsp;&nbsp;&nbsp;&nbsp;}<br/><br/><br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;public&nbsp;&nbsp;int ExecuteCommand(string safeSql)<br/>&nbsp;&nbsp;&nbsp;&nbsp;{<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;OleDbCommand cmd = new OleDbCommand(safeSql,Connection);<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;int result = cmd.ExecuteNonQuery();<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return result;<br/>&nbsp;&nbsp;&nbsp;&nbsp;}<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;public&nbsp;&nbsp;int ExecuteCommand(string sql, params SqlParameter[] values)<br/>&nbsp;&nbsp;&nbsp;&nbsp;{<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;OleDbCommand cmd = new OleDbCommand(sql, Connection);<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cmd.Parameters.AddRange(values);<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return cmd.ExecuteNonQuery();<br/>&nbsp;&nbsp;&nbsp;&nbsp;}<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;public&nbsp;&nbsp;int GetScalar(string safeSql)<br/>&nbsp;&nbsp;&nbsp;&nbsp;{<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;OleDbCommand cmd = new OleDbCommand(safeSql, Connection);<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;int result = Convert.ToInt32(cmd.ExecuteScalar());<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return result;<br/>&nbsp;&nbsp;&nbsp;&nbsp;}<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;public&nbsp;&nbsp;int GetScalar(string sql, SqlParameter[] values)<br/>&nbsp;&nbsp;&nbsp;&nbsp;{<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;OleDbCommand cmd = new OleDbCommand(sql, Connection);<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cmd.Parameters.AddRange(values);<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;int result = Convert.ToInt32(cmd.ExecuteScalar());<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return result;<br/>&nbsp;&nbsp;&nbsp;&nbsp;}<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;public&nbsp;&nbsp;OleDbDataReader GetReader(string safeSql)<br/>&nbsp;&nbsp;&nbsp;&nbsp;{<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;OleDbCommand cmd = new OleDbCommand(safeSql, Connection);<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;OleDbDataReader reader = cmd.ExecuteReader();<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return reader;<br/>&nbsp;&nbsp;&nbsp;&nbsp;}<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;public&nbsp;&nbsp;OleDbDataReader GetReader(string sql, SqlParameter[] values)<br/>&nbsp;&nbsp;&nbsp;&nbsp;{<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;OleDbCommand cmd = new OleDbCommand(sql, Connection);<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cmd.Parameters.AddRange(values);<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;OleDbDataReader reader = cmd.ExecuteReader();<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return reader;<br/>&nbsp;&nbsp;&nbsp;&nbsp;}<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;public&nbsp;&nbsp;DataTable GetDataSet(string safeSql)<br/>&nbsp;&nbsp;&nbsp;&nbsp;{<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;DataSet ds = new DataSet();<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;OleDbCommand cmd = new OleDbCommand(safeSql, Connection);<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;OleDbDataAdapter da = new OleDbDataAdapter(cmd);<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;da.Fill(ds);<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return ds.Tables[0];<br/>&nbsp;&nbsp;&nbsp;&nbsp;}<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;public&nbsp;&nbsp;DataTable GetDataSet(string sql, SqlParameter[] values)<br/>&nbsp;&nbsp;&nbsp;&nbsp;{<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;DataSet ds = new DataSet();<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;OleDbCommand cmd = new OleDbCommand(sql, Connection);<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cmd.Parameters.AddRange(values);<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;OleDbDataAdapter da = new OleDbDataAdapter(cmd);<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;da.Fill(ds);<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return ds.Tables[0];<br/>&nbsp;&nbsp;&nbsp;&nbsp;}<br/><br/><br/>}<br/><br/>下面是前台的代码：<br/>代码<br/> protected string BindDrName(string srk) //收款人 销售员<br/>&nbsp;&nbsp;&nbsp;&nbsp;{<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (Session[&#34;shopid&#34;] == null)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Response.Redirect(&#34;MemberLogin.aspx&#34;);<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;string myshopDB = Session[&#34;shopid&#34;].ToString();<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;string asafilepath = System.Web.HttpContext.Current.Server.MapPath(&#34;~/App_Data/&#34; + myshopDB + &#34;.asa&#34;);<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;AccessDBHelper acc = new AccessDBHelper(asafilepath);<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;string sql = &#34;sel&#101;ct * from dr wh&#101;re dr_hm=&#39;&#34; + srk +&#34;&#39;&#34;;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;DataTable dt = acc.GetDataSet(sql);<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;string drname = &#34;&#34;;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;foreach (DataRow item in dt.Rows)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;drname = item[&#34;dr_name&#34;].ToString();<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return drname;<br/>&nbsp;&nbsp;&nbsp;&nbsp;}<br/><br/> <br/><br/>该项目 在前台登录的时候做了一个下拉列表记录 选择的是那一项，然后记录该value然后存入session中，asa就是access数据库，名字与dro&#112;downlist中的value对应，因为都是和数据库的某个id对应起来的，access数据库的名字就是一个id值，后缀名为 .asa。这一系列不断上传的asa文件就存放在根目录的App_Data文件中！]]></summary>
	  <link rel="alternate" type="text/html" href="http://www.mdrt.org.cn/article/37.htm" /> 
	  <id>http://www.mdrt.org.cn/default.asp?id=37</id>
  </entry>	
		
  <entry>
	  <title type="html"><![CDATA[ RegularExpressionValidator 控件中正则表达式用法～]]></title>
	  <author>
		 <name>jbkadmin</name>
		 <uri>http://www.mdrt.org.cn/</uri>
		 <email>anyshe@126.com</email>
	  </author>
	  <category term="" scheme="http://www.mdrt.org.cn/default.asp?cateID=6" label="网页脚本类" /> 
	  <updated>2010-06-13T09:53:47+08:00</updated>
	  <published>2010-06-13T09:53:47+08:00</published>
		  <summary type="html"><![CDATA[同样参考清清月儿的博客．谢谢清清月儿前辈．<br/>RegularExpressionValidator控件中正则表达式用法<br/><br/>验证数 字：<br/>只 能输入1个数字 <br/><br/><br/><br/>表达式<br/><br/>^\d$<br/><br/>描述<br/><br/>匹配一个数字<br/><br/>匹配的例子<br/><br/>0,1,2,3<br/><br/>不匹配的例子<br/><br/><br/><br/><br/><br/>只 能输入n个数字 <br/><br/><br/><br/>表达式<br/><br/>^\d{n}$ 例如^\d{8}$<br/><br/>描述<br/><br/>匹配8个数字<br/><br/>匹配的例子<br/><br/>12345678,22223334,12344321<br/><br/>不匹配的例子<br/><br/><br/><br/><br/><br/>只 能输入至少n个数字 <br/><br/><br/><br/>表达式<br/><br/>^\d{n,}$ 例如^\d{8,}$<br/><br/>描述<br/><br/>匹配最少n个数字<br/><br/>匹配的例子<br/><br/>12345678,123456789,12344321<br/><br/>不匹配的例子<br/><br/><br/><br/><br/><br/>只 能输入m到n个数字 <br/><br/><br/><br/>表达式<br/><br/>^\d{m,n}$ 例如^\d{7,8}$<br/><br/>描述<br/><br/>匹配m到n个数字<br/><br/>匹配的例子<br/><br/>12345678,1234567<br/><br/>不匹配的例子<br/><br/>123456,123456789<br/><br/><br/><br/>只 能输入数字 <br/><br/><br/><br/>表达式<br/><br/>^[0-9]*$<br/><br/>描述<br/><br/>匹配任意个数字<br/><br/>匹配的例子<br/><br/>12345678,1234567<br/><br/>不匹配的例子<br/><br/>E,<br/><br/><br/><br/>只 能输入某个区间数字 <br/><br/><br/><br/>表达式<br/><br/>^[12-15]$<br/><br/>描述<br/><br/>匹配某个区间的数字<br/><br/>匹配的例子<br/><br/>12,13,14,15<br/><br/>不匹配的例子<br/><br/><br/><br/><br/><br/>只 能输入0和非0打头的数字 <br/><br/><br/><br/>表达式<br/><br/>^(0|[1-9][0-9]*)$<br/><br/>描述<br/><br/>可以为0，第一个数字不能为0，数字中可以有0<br/><br/>匹配的例子<br/><br/>12,10,101,100<br/><br/>不匹配的例子<br/><br/>01,<br/><br/><br/><br/>只 能输入实数 <br/><br/><br/><br/>表达式<br/><br/>^[-+]?\d+(\.\d+)?$<br/><br/>描述<br/><br/>匹配实数<br/><br/>匹配的例子<br/><br/>18,+3.14,-9.90<br/><br/>不匹配的例子<br/><br/>.6,33s,67-99<br/><br/><br/><br/>只 能输入n位小数的正实数 <br/><br/><br/><br/>表达式<br/><br/>^[0-9]+(.[0-9]{n})?$以^[0-9]+(.[0-9] {2})?$为例<br/><br/>描述<br/><br/>匹配n位小数的正实数<br/><br/>匹配的例子<br/><br/>2.22<br/><br/>不匹配的例子<br/><br/>2.222,-2.22,<a href="http://blog.csdn.net/21aspnet" target="_blank" rel="external">http://blog.csdn.net/21aspnet</a><br/><br/><br/><br/>只 能输入m-n位小数的正实数 <br/><br/><br/><br/>表达式<br/><br/>^[0-9]+(.[0-9]{m,n})?$以^[0-9]+(. [0-9]{1,2})?$为例<br/><br/>描述<br/><br/>匹配m到n位小数的正实数<br/><br/>匹配的例子<br/><br/>2.22,2.2<br/><br/>不匹配的例子<br/><br/>2.222,-2.2222,<a href="http://blog.csdn.net/21aspnet" target="_blank" rel="external">http://blog.csdn.net/21aspnet</a><br/><br/><br/><br/>只 能输入非0的正整数 <br/><br/><br/><br/>表达式<br/><br/>^\+?[1-9][0-9]*$<br/><br/>描述<br/><br/>匹配非0的正整数<br/><br/>匹配的例子<br/><br/>2,23,234<br/><br/>不匹配的例子<br/><br/>0,-4,<br/><br/><br/><br/>只 能输入非0的负整数 <br/><br/><br/><br/>表达式<br/><br/>^\-[1-9][0-9]*$<br/><br/>描述<br/><br/>匹配非0的负整数<br/><br/>匹配的例子<br/><br/>-2,-23,-234<br/><br/>不匹配的例子<br/><br/>0,4,<br/><br/><br/><br/>只 能输入n个字符 <br/><br/><br/><br/>表达式<br/><br/>^.{n}$ 以^.{4}$为例<br/><br/>描述<br/><br/>匹配n个字符，注意汉字只算1个字符<br/><br/>匹配的例子<br/><br/>1234,12we,123清,清清月儿<br/><br/>不匹配的例子<br/><br/>0,123,123www,<br/><br/><br/><br/>只 能输入英文字符 <br/><br/><br/><br/>表达式<br/><br/>^.[A-Za-z]+$为例<br/><br/>描述<br/><br/>匹配英文字符，大小写任意<br/><br/>匹配的例子<br/><br/>Asp,WWW,<br/><br/>不匹配的例子<br/><br/>0,123,123www,<br/><br/><br/><br/>只 能输入大写英文字符 <br/><br/><br/><br/>表达式<br/><br/>^.[A-Z]+$为例<br/><br/>描述<br/><br/>匹配英文大写字符<br/><br/>匹配的例子<br/><br/>NET,WWW,<br/><br/>不匹配的例子<br/><br/>0,123,123www,<br/><br/><br/><br/>只 能输入小写英文字符 <br/><br/><br/><br/>表达式<br/><br/>^.[a-z]+$为例<br/><br/>描述<br/><br/>匹配英文大写字符<br/><br/>匹配的例子<br/><br/>asp,csdn<br/><br/>不匹配的例子<br/><br/>0,NET,WWW,<br/><br/><br/><br/>只 能输入英文字符+数字 <br/><br/><br/><br/>表达式<br/><br/>^.[A-Za-z0-9]+$为例<br/><br/>描述<br/><br/>匹配英文字符+数字<br/><br/>匹配的例子<br/><br/>1Asp,W1W1W,<br/><br/>不匹配的例子<br/><br/>0,123,123,www,<br/><br/><br/><br/>只 能输入英文字符/数字/下划线 <br/><br/><br/><br/>表达式<br/><br/>^\w+$为例<br/><br/>描述<br/><br/>匹配英文字符或数字或下划线<br/><br/>匹配的例子<br/><br/>1Asp,WWW,12,1_w<br/><br/>不匹配的例子<br/><br/>3#,2-4,w#$,<br/><br/><br/><br/>密 码举例<br/><br/><br/><br/>表达式<br/><br/>^.[a-zA-Z]\w{m,n}$<br/><br/>描述<br/><br/>匹配英文字符开头的m-n位字符且只能数字字母或下划线<br/><br/>匹配的例子<br/><br/><br/><br/>不匹配的例子<br/><br/><br/><br/><br/><br/>验证首字母大写<br/><br/><br/>表达式<br/><br/>\b[^\Wa-z0-9_][^\WA-Z0-9_]*\b<br/><br/>描述<br/><br/>首字母只能大写<br/><br/>匹配的例子<br/><br/>Asp,Net<br/><br/>不匹配的例子<br/><br/><br/><br/><br/><br/>验证网址（带?id=中文）VS.NET2005无此功能<br/><br/><br/>表达式<br/><br/>^http:\/\/([\w-]+(\.[\w-]+)+(\/[\w- .\/\?%&amp;=\u4e00-\u9fa5]*)?)?$<br/><br/><br/><br/>描述<br/><br/>验证带?id=中文<br/><br/>匹配的例子<br/><br/>,<br/><a href="http://blog.csdn.net?id=" target="_blank" rel="external">http://blog.csdn.net?id=</a> 清清月儿<br/><br/>不匹配的例子<br/><br/><br/><br/><br/><br/>验证汉字<br/><br/><br/>表达式<br/><br/>^[\u4e00-\u9fa5]{0,}$<br/><br/>描述<br/><br/>只能汉字<br/><br/>匹配的例子<br/><br/>清清月儿<br/><br/>不匹配的例子<br/><br/><br/><br/><br/><br/>验证QQ号<br/><br/><br/>表达式<br/><br/>[0-9]{5,9}<br/><br/>描述<br/><br/>5-9位的QQ号<br/><br/>匹配的例子<br/><br/>10000,123456<br/><br/>不匹配的例子<br/><br/>10000w,<br/><br/><br/><br/>验证电子邮件（验证MSN号一样）<br/><br/>表达式<br/><br/>\w+([-+.&#39;]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*<br/><br/>描述<br/><br/>注意MSN用非 hotmail.com邮箱也可以<br/><br/>匹配的例子<br/><br/>aaa@msn.com<br/><br/>不匹配的例子<br/><br/>111@1. <br/><br/><br/><br/>验证身份证号（粗验，最好服务器端调类库再细 验证）<br/><br/><br/>表达式<br/><br/>^[1-9]([0-9]{16}|[0-9]{13})[xX0-9]$<br/><br/>描述<br/><br/><br/><br/>匹配的例子<br/><br/>15或者18位的身份证号，支 持带X的<br/><br/>不匹配的例子<br/><br/><br/><br/><br/><br/>验证手机号（包含159，不包含小灵通）<br/><br/><br/>表达式<br/><br/>^13[0-9]{1}[0-9]{8}|^15[9]{1}[0-9]{8}<br/><br/>描述<br/><br/>包含159的手机号130-139<br/><br/>匹配的例子<br/><br/>139XXXXXXXX<br/><br/>不匹配的例子<br/><br/>140XXXXXXXX,<br/><br/><br/><br/>验证电话号码号（很复 杂，VS.NET2005给的是错的）<br/><br/><br/>表达式（不完美）<br/><br/>方案一 ((\(\d{3}\)|\d{3}-)|(\(\d{4}\)|\d{4}-))?(\d{8}|\d{7})<br/>方案二 (^[0-9]{3,4}\-[0-9]{3,8}$)|(^[0-9]{3,8}$)|(^\([0-9]{3,4}\)[0-9]{3,8}$)|(^0{0,1}13[0-9]{9}$) 支持手机号但也不完美<br/><br/>描述<br/><br/>上海：02112345678 3+8位<br/>上海：021-12345678<br/>上海： (021)-12345678<br/>上海：(021)12345678<br/>郑州：03711234567 4+7位<br/>杭 州：057112345678 4+8位<br/>还有带上分机号，国家码的情况<br/>由于情况非 常复杂所以不建议前台做100%验证，到目前为止似乎也没有谁能写一个包含所有的类型，其实有很多情况本身就是矛盾 的。<br/>如果谁有更好的 验证电话的请留言<br/><br/><br/><br/>匹配的例子<br/><br/><br/><br/>不匹配的例子<br/><br/><br/><br/><br/><br/>验证护照<br/><br/><br/>表达式<br/><br/>(P\d{7})|G\d{8})<br/><br/><br/><br/>描述<br/><br/>验证P+7个数字和G+8个数字<br/><br/>匹配的例子<br/><br/><br/><br/>不匹配的例子<br/><br/>/<br/><br/><br/><br/>验证IP<br/><br/><br/>表达式<br/><br/>^(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9])\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[0-9])$<br/><br/><br/><br/>描述<br/><br/>验证IP<br/><br/>匹配的例子<br/><br/>192.168.0.1 222.234.1.4<br/><br/>不匹配的例子<br/><br/><br/><br/><br/><br/>验证域<br/><br/>表达式<br/><br/>^[a-zA-Z0-9]+([a-zA-Z0-9\-\.]+)?\.(com|org|net|cn|com.cn|edu.cn|grv.cn|)$<br/><br/><br/><br/>描述<br/><br/>验证域<br/><br/>匹配的例子<br/><br/>csdn.net baidu.com it.com.cn<br/><br/>不匹配的例子<br/><br/>192.168.0.1 <br/><br/><br/><br/>验证信用卡<br/><br/>表达式<br/><br/>^((?:4\d{3})|(?:5[1-5]\d{2})|(?:6011)|(?:3[68]\d{2})|(?:30[012345]\d))[ -]?(\d{4})[ -]?(\d{4})[ -]?(\d{4}|3[4,7]\d{13})$<br/><br/><br/><br/>描述<br/><br/>验证VISA卡，万事达卡，Discover卡，美国运通卡<br/><br/>匹配的例子<br/><br/><br/><br/>不匹配的例子<br/><br/><br/><br/><br/><br/>验 证ISBN国际标准书号<br/><br/>表达式<br/><br/>^(\d[- ]*){9}[\dxX]$<br/><br/><br/><br/>描述<br/><br/>验证ISBN国际标准书号<br/><br/>匹配的例子<br/><br/>7-111-19947-2<br/><br/>不匹配的例子<br/><br/><br/><br/><br/><br/>验 证GUID全球唯一标识符<br/><br/>表达式<br/><br/>^[A-Z0-9]{8}-[A-Z0-9]{4}-[A-Z0-9]{4}-[A-Z0-9]{4}-[A-Z0-9]{12}$<br/><br/><br/><br/>描述<br/><br/>格式8-4-4-4-12<br/><br/>匹配的例子<br/><br/>2064d355-c0b9-41d8-9ef7-9d8b26524751<br/><br/>不匹配的例子<br/><br/><br/><br/><br/><br/>验 证文件路径和扩展名<br/><br/>表达式<br/><br/>^([a-zA-Z]\:|\\)\\([^\\]+\\)*[^\/:*?&#34;&lt;&gt;|]+\.txt(l)?$<br/><br/><br/><br/>描述<br/><br/>检查路径和文件扩展名<br/><br/>匹配的例子<br/><br/>E:\mo.txt<br/><br/>不匹配的例子<br/><br/>E:\ , mo.doc, E:\mo.doc ,<br/><br/><br/><br/>验 证Html颜色值<br/><br/>表达式<br/><br/>^#?([a-f]|[A-F]|[0-9]){3}(([a-f]|[A-F]|[0-9]){3})?$<br/><br/><br/><br/>描述<br/><br/>检查颜色取值<br/><br/>匹配的例子<br/><br/>#FF0000<br/><br/>不匹配的例子<br/><br/><br/><br/>]]></summary>
	  <link rel="alternate" type="text/html" href="http://www.mdrt.org.cn/article/36.htm" /> 
	  <id>http://www.mdrt.org.cn/default.asp?id=36</id>
  </entry>	
		
  <entry>
	  <title type="html"><![CDATA[jqModal ]]></title>
	  <author>
		 <name>jbkadmin</name>
		 <uri>http://www.mdrt.org.cn/</uri>
		 <email>anyshe@126.com</email>
	  </author>
	  <category term="" scheme="http://www.mdrt.org.cn/default.asp?cateID=6" label="网页脚本类" /> 
	  <updated>2010-06-12T11:31:30+08:00</updated>
	  <published>2010-06-12T11:31:30+08:00</published>
		  <summary type="html"><![CDATA[Minimalist Modaling with jQuery<br/><br/>What?<br/><br/>jqModal is a plugin for jQuery to help you display notices, dialogs, and modal windows in a web browser. It is flexible and tiny, akin to a &#34;Swiss Army Knife&#34;, and makes a great base as a general purpose windowing framework.<br/><br/>Features;<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;* Designer Frieldly - Use *your* HTML+CSS for Layout and Styling<br/>&nbsp;&nbsp;&nbsp;&nbsp;* Translator/i18n friendly - No hardcoded English strings<br/>&nbsp;&nbsp;&nbsp;&nbsp;* Developer friendly - Extensible through callbacks to make anything (gallery slideshows, video-conferencing, etc.) possible<br/>&nbsp;&nbsp;&nbsp;&nbsp;* Simple support for remotely loaded content (aka &#34;AJAX&#34;)<br/>&nbsp;&nbsp;&nbsp;&nbsp;* Multiple Modal Support (including Modal-in-Modal)<br/><br/>Why?<br/><br/>There is no shortage of dialog scripts that &#34;dazzle&#34; their audience. Some will try to walk your dog. These scripts are often rooted in unnecessary effects, are rigid, and extremely cumbersome. This is not wh&#101;re jqModal is headed! I wanted to write a simple modal framework. Something lightweight yet powerful and flexible. We&#39;ll demonstrate the dazzling dogwalks later... for now, you are encouraged to pioneer your own effects by harnessing the power of jQuery and jqModal!<br/><br/>If you like jqModal, please consider a dontation to support its development:<br/>When?<br/><br/>Current Version: 2009.03.01 +r14<br/>Copyright © 2007-2009 Brice Burgess - released under both the MIT and GPL licenses.<br/>Wh&#101;re?<br/><br/>Download the Plugin (jqModal.js - 2.97k) [jQuery &gt;= 1.1.3.1+]<br/>Download the Styling (jqModal.css - 496 bytes)<br/><br/>[PREVIOUS RELEASES] available here.<br/><br/>[OPTIONAL] Drag&#39;n&#39;Resize Plugin (jqDnR.js - 874 bytes) - It is recommended to combine DnR and jqModal javascript files into one to reduce server overhead.<br/><br/>&nbsp;&nbsp;** file sizes reflect uncompressed source with header removed<br/>Image Caching; Some browsers do not preload background images and image elements if they are hidden (have a parent whose display is set to none o&#114; hidden). This could effect the responsiveness of your dialogs. This page uses an OPTIONAL workaround to get around this issue. It preloads dialog decoration images for faster display. See the code used by clicking the HTML tab below;<br/>HTML<br/><br/>&lt;!-- optional: image cacheing. Any images contained in this div will be<br/>&#160;&#160;&#160;&#160;loaded offscreen, and thus cached --&gt;<br/>&#160;&#160;&#160;&#160;<br/>&lt;style type=&#34;text/css&#34;&gt;<br/>/* Caching CSS cr&#101;ated with the help of;<br/>&#160;&#160;&#160;&#160;Klaus Hartl &lt;klaus.hartl@stilbuero.de&gt; */<br/>@media projection, screen {<br/>&nbsp;&nbsp;&nbsp;&nbsp; div.imgCache { position: absolute; left: -8000px; top: -8000px; }<br/>&nbsp;&nbsp;&nbsp;&nbsp; div.imgCache img { display:block; }<br/>}<br/>@media print { div.imgCache { display: none; } }<br/>&lt;/style&gt;<br/><br/>&lt;div class=&#34;imgCache&#34;&gt;<br/>&#160;&#160;&#160;&#160;&lt;img src=&#34;inc/busy.gif&#34; /&gt;<br/>&#160;&#160;&#160;&#160;&lt;img src=&#34;dialog/close.gif&#34; /&gt;<br/>&#160;&#160;&#160;&#160;&lt;img src=&#34;dialog/sprite.gif&#34; /&gt;<br/>&#160;&#160;&#160;&#160;&lt;img src=&#34;dialog/close_sprite.gif&#34; /&gt;<br/>&#160;&#160;&#160;&#160;&lt;img src=&#34;dialog/bl.gif&#34; /&gt;<br/>&#160;&#160;&#160;&#160;&lt;img src=&#34;dialog/br.gif&#34; /&gt;<br/>&#160;&#160;&#160;&#160;&lt;img src=&#34;dialog/bc.gif&#34; /&gt;<br/>&#160;&#160;&#160;&#160;&lt;img src=&#34;notice/note_icon.png&#34; /&gt;<br/>&#160;&#160;&#160;&#160;&lt;img src=&#34;notice/close_icon.png&#34; /&gt;<br/>&lt;/div&gt;<br/><br/>Test for Internet Explorer 6:<br/>How?<br/><br/>Usage<br/>Typically, to add popup dialogs, frames, windows, o&#114; what-have-yous to your website you must;<br/><br/>1. Add dialog placeholder(s) to your page<br/>&nbsp;&nbsp;&nbsp;&nbsp;Dialog placeholders are usually hidden &lt;div&gt; containers placed as children of the &lt;body&gt; element. CSS is used for styling and position. Dialogs are displayed(&#34;shown&#34;) when a trigger event occurs. Their contents(message/image/etc.) can be inline (hardcoded in the HTML) o&#114; added via ajax when the dialog is shown.<br/>2. Initialize your dialog(s)<br/>&nbsp;&nbsp;&nbsp;&nbsp;jqModal must be called on each dialog element before it can be shown using the $.jqm() function. You can customize your dialogs by passing parameters as an argument (e.g. $(&#39;#dialog&#39;).jqm({modal: true, trigger: &#39;a.showDialog&#39;});).<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;NOTE: $.jqm() should only be called ONCE per dialog element! In special cases you may want to change a dialog&#39;s parameters. Subsequent calls to $.jqm() will up&#100;ate the dialog(s) parameters. <br/>3. Trigger your dialog<br/>&nbsp;&nbsp;&nbsp;&nbsp;Dialogs are automatically shown when a &#34;trigger&#34; element is clicked. You can also manually trigger a dialog by executing the $.jqmShow() function on it.<br/><br/>Functions<br/><br/>jqm<br/>&nbsp;&nbsp;&nbsp;&nbsp;Initialize element(s) to be used as a jqModal. Accepts a parameters object. If element(s) are already initialized, the call will up&#100;ate their parameters.<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;$(&#39;#dialog&#39;).jqm();<br/>&nbsp;&nbsp;&nbsp;&nbsp;$(&#39;.dialogs&#39;).jqm({ajax:&#39;@href&#39;,modal:true});<br/>jqmShow<br/>&nbsp;&nbsp;&nbsp;&nbsp;Show jqModal element(s).<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;$(&#39;#dialog&#39;).jqmShow();<br/>&nbsp;&nbsp;&nbsp;&nbsp;$(&#39;.dialogs&#39;).jqmShow();<br/>jqmHide<br/>&nbsp;&nbsp;&nbsp;&nbsp;Hide jqModal element(s).<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;$(&#39;#dialog&#39;).jqmHide();<br/>&nbsp;&nbsp;&nbsp;&nbsp;$(&#39;.dialogs&#39;).jqmHide();<br/>jqmAddTrigger<br/>&nbsp;&nbsp;&nbsp;&nbsp;Adds the passed element(s) as a &#34;show&#34; trigger. Clicking them will show the jqModal. Accepts;<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* (string) A jQuery Sel&#101;ctor<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* (object) A jQuery Collection<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* (object) A DOM element<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;$(&#39;#dialog&#39;).jqmAddTrigger(&#39;.openDialog&#39;);<br/>&nbsp;&nbsp;&nbsp;&nbsp;$(&#39;.dialogs&#39;).jqmAddTrigger($(&#39;#openDialogs a&#39;));<br/>jqmAddClose<br/>&nbsp;&nbsp;&nbsp;&nbsp;Adds the passed element(s) as a &#34;close&#34; trigger. Clicking them will hide the jqModal. Accepts;<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* (string) A jQuery Sel&#101;ctor<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* (object) A jQuery Collection<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* (object) A DOM element<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;$(&#39;#dialog&#39;).jqmAddClose(&#39;.hideDialog&#39;);<br/>&nbsp;&nbsp;&nbsp;&nbsp;$(&#39;.dialogs&#39;).jqmAddClose($(&#39;#hideDialogs a&#39;));<br/><br/>Parameters<br/>Parameters allow tailoring the behavior of any jqModal to your needs. They are passed on-the-fly as an object to the $.jqm function.<br/><br/>NOTE; you can overide the default setting of a parameter by modifying the $.jqm.params global. For instance, to have ALL dialogs appear as modal dialogs (without passing modal as &#34;true&#34;), execute $.jqm.params.modal = true before any calls to the $.jqm() function.<br/><br/>overlay<br/>&nbsp;&nbsp;&nbsp;&nbsp;The overlay transparency as a percentage. If 0 the overlay is disabled, and the page will remain interactive. If 100 the overlay will be 100% opaque.<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;(integer) - default: 50<br/>overlayClass<br/>&nbsp;&nbsp;&nbsp;&nbsp;Name of CSS class applied to the overlay.<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;(string) - default: &#39;jqmOverlay&#39;<br/>closeClass<br/>&nbsp;&nbsp;&nbsp;&nbsp;When a dialog is shown, elements that have a CSS class of closeClass will close the dialog when clicked. For instance; If your dialog contains an &lt;img class=&#34;closeClass&#34; src=&#34;close.gif&#34;&gt;, the dialog will close when this image is clicked. You can use $.jqmHide() to close a dialog manually.<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;(string|false) - default: &#39;jqmClose&#39;<br/>trigger<br/>&nbsp;&nbsp;&nbsp;&nbsp;Elements matching trigger will show the dialog when clicked. They are assigned when $.jqm() is called. Triggers can be;<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* (string) A jQuery Sel&#101;ctor<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* (object) A DOM element (e.g. $.jqm({trigger: document.getElementByID(&#34;showDialog&#34;)})<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* (false) The call to $.jqm() will not look for trigger elements.<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;(string|object|false) - default: &#39;.jqModal&#39;<br/>ajax<br/>&nbsp;&nbsp;&nbsp;&nbsp;If passed, dialog contents will be loaded remotely via ajax. You can pass the URL (e.g. $.jqm({ajax:&#39;remote/dialog.html&#39;}) o&#114; extract it from an attribute of the triggering element. For instance, $(.jqm({ajax:&#39;@href&#39;}) would grab contents from bar.html if the triggering element was &lt;a href=&#34;foo/bar.html&#34;&gt;Open Dialog&lt;/a&gt;. If a more complicated loading routine is desired, the onShow() callback should be leveraged.<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;(string|false) - default: false<br/>ajaxText<br/><br/>NOTE: ajaxText is applicable only if the ajax parameter is passed.<br/>&nbsp;&nbsp;&nbsp;&nbsp;Text to display while waiting for ajax returned content. May include HTML (such as an loading image). E.g. $.jqm({ajaxText: &#39;&lt;marquee style=&#34;width: 1.5em;&#34;&gt;.. ... .&lt;/marquee&gt;&#39;});<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;(string) - default: &#39;&#39;<br/>target<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;NOTE: target is applicable only if the ajax parameter is passed.<br/>&nbsp;&nbsp;&nbsp;&nbsp;If passed, the ajax return will be loaded into the target element. The target element MUST EXIST as a child of the dialog. Target can be;<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* (string) A jQuery Sel&#101;ctor<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* (object) A DOM element (e.g. $.jqm({target: $(&#39;#dialog div.contents&#39;)[0]})<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* (false) ajax return overwrites dialog&#39;s innerHTML<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;(string|false) - default: false<br/>modal<br/>&nbsp;&nbsp;&nbsp;&nbsp;Restricts input (mouse clicks, keypresses) to the dialog. NOTE: If false, and if overlay is enabled, CLICKING THE OVERLAY WILL CLOSE THE DIALOG.<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;(boolean) - default: false<br/>toTop<br/>&nbsp;&nbsp;&nbsp;&nbsp;When true; places the dialog element as a direct child of &lt;body&gt; when shown. This was added to help overcome z-Index stacking o&#114;der issues.<br/>&nbsp;&nbsp;&nbsp;&nbsp;See the toTop demo to learn what to do if your overlay covers the entire page *including* the modal dialog!<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;(boolean) - default: false<br/>[Callbacks]<br/>&nbsp;&nbsp;&nbsp;&nbsp;Callbacks allow advanced customization of jqModal dialogs. Each callback is passed the &#34;hash&#34; object consisting of the following properties;<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* w: (jQuery object) The dialog element<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* c: (object) The config object (dialog&#39;s parameters)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* o: (jQuery object) The overlay<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* t: (DOM object) The triggering element <br/><br/>onShow (callback)<br/>&nbsp;&nbsp;&nbsp;&nbsp;Called when a dialog is to be shown. Be sure to show (set visible) the dialog.<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;// onShow : show+make the window translucent<br/>&nbsp;&nbsp;&nbsp;&nbsp;var myOpen=function(hash){ hash.w.css(&#39;opacity&#39;,0.88).show(); };<br/>&nbsp;&nbsp;&nbsp;&nbsp;$(&#39;#dialog&#39;).jqm({onShow:myOpen});<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;(function|false) - default: false<br/>onHide (callback)<br/>&nbsp;&nbsp;&nbsp;&nbsp;Called when a dialog is to be hidden. Be sure to remove the overlay (if enabled).<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;// onHide : fade the window out, remove overlay after fade.<br/>&nbsp;&nbsp;&nbsp;&nbsp;var myClose=function(hash) { hash.w.fadeOut(&#39;2000&#39;,function(){ hash.o.remove(); }); };<br/>&nbsp;&nbsp;&nbsp;&nbsp;$(&#39;#dialog&#39;).jqm({onHide:myClose});<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;(function|false) - default: false<br/>onLoad (callback)<br/>&nbsp;&nbsp;&nbsp;&nbsp;Called right after ajax content is loaded.<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;// onLoad : assign Mike Alsup&#39;s most excellent ajaxForm plugin to the returned form element(s).<br/>&nbsp;&nbsp;&nbsp;&nbsp;var myLoad = function(hash){ $(&#39;form&#39;,hash.w).ajaxForm(); };<br/>&nbsp;&nbsp;&nbsp;&nbsp;$(&#39;#dialog&#39;).jqm({onLoad:myLoad});<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;(function|false) - default: false<br/><br/>See the README for further information.<br/><br/>Examples<br/>1. Defaults -- view<br/>Out-of-box behavior. The window and its content is taken &#34;inline&#34; from the element with an ID of &#39;dialog&#39;. The dialog is &#34;triggered&#34; (shown) when element(s) with class jqModal are clicked. No parameters are passed, no fancy window decorations used.<br/>Close READ ME --&gt; This is a &#34;vanilla plain&#34; jqModal window. Behavior and appeareance extend far beyond this. The demonstrations on this page will show off a few possibilites. I recommend walking through each one to get an understanding of jqModal before using it.<br/><br/>You can view the sourcecode of examples by clicking the Javascript, CSS, and HTML tabs. Be sure to checkout the documentation too!<br/><br/>NOTE; You can close windows by clicking the tinted background known as the &#34;overlay&#34;. Clicking the overlay will have no effect if the &#34;modal&#34; parameter is passed, o&#114; if the overlay is disabled.<br/>Javascript<br/><br/>$().ready(function() {<br/>&nbsp;&nbsp;$(&#39;#dialog&#39;).jqm();<br/>});<br/><br/>CSS<br/><br/>/* jqModal base Styling courtesy of;<br/>&nbsp;&nbsp;Brice Burgess &lt;bhb@iceburg.net&gt; */<br/><br/>/* The Window&#39;s CSS z-index value is respected (takes priority). If none is supplied,<br/>&nbsp;&nbsp;the Window&#39;s z-index value will be set to 3000 by default (in jqModal.js). You<br/>&nbsp;&nbsp;can change this value by either;<br/>&nbsp;&nbsp;&nbsp;&nbsp;a) supplying one via CSS<br/>&nbsp;&nbsp;&nbsp;&nbsp;b) passing the &#34;zIndex&#34; parameter. E.g.&nbsp;&nbsp;(window).jqm({zIndex: 500}); */<br/>&nbsp;&nbsp;<br/>.jqmWindow {<br/>&nbsp;&nbsp;&nbsp;&nbsp;display: none;<br/>&nbsp;&nbsp;&nbsp;&nbsp;<br/>&nbsp;&nbsp;&nbsp;&nbsp;position: fixed;<br/>&nbsp;&nbsp;&nbsp;&nbsp;top: 17%;<br/>&nbsp;&nbsp;&nbsp;&nbsp;left: 50%;<br/>&nbsp;&nbsp;&nbsp;&nbsp;<br/>&nbsp;&nbsp;&nbsp;&nbsp;margin-left: -300px;<br/>&nbsp;&nbsp;&nbsp;&nbsp;width: 600px;<br/>&nbsp;&nbsp;&nbsp;&nbsp;<br/>&nbsp;&nbsp;&nbsp;&nbsp;background-color: #EEE;<br/>&nbsp;&nbsp;&nbsp;&nbsp;color: #333;<br/>&nbsp;&nbsp;&nbsp;&nbsp;border: 1px solid black;<br/>&nbsp;&nbsp;&nbsp;&nbsp;padding: 12px;<br/>}<br/><br/>.jqmOverlay { background-color: #000; }<br/><br/>/* Fixed posistioning emulation for IE6<br/>&nbsp;&nbsp;&nbsp;&nbsp; Star sel&#101;ctor used to hide definition from browsers other than IE6<br/>&nbsp;&nbsp;&nbsp;&nbsp; For valid CSS, use a conditional include instead */<br/>* html .jqmWindow {<br/>&nbsp;&nbsp;&nbsp;&nbsp; position: absolute;<br/>&nbsp;&nbsp;&nbsp;&nbsp; top: e&#173;xpression((document.documentElement.scrollTop || document.body.scrollTop) + Math.round(17 * (document.documentElement.offsetHeight || document.body.clientHeight) / 100) + &#39;px&#39;);<br/>}<br/><br/>HTML<br/><br/>&lt;a href=&#34;#&#34; class=&#34;jqModal&#34;&gt;view&lt;/a&gt;<br/>...<br/>&lt;div class=&#34;jqmWindow&#34; id=&#34;dialog&#34;&gt;<br/><br/>&lt;a href=&#34;#&#34; class=&#34;jqmClose&#34;&gt;Close&lt;/a&gt;<br/>&lt;hr&gt;<br/>&lt;em&gt;READ ME&lt;/em&gt; --&gt;<br/>This is a &#34;vanilla plain&#34; jqModal window. Behavior and appeareance extend far beyond this.<br/>The demonstrations on this page will show off a few possibilites. I recommend walking<br/>through each one to get an understanding of jqModal &lt;em&gt;before&lt;/em&gt; using it.<br/><br/>&lt;br /&gt;&lt;br /&gt;<br/>You can view the sourcecode of examples by clicking the Javascript, CSS, and HTML tabs.<br/>Be sure to checkout the &lt;a href=&#34;README&#34;&gt;documentation&lt;/a&gt; too!<br/><br/>&lt;br /&gt;&lt;br /&gt;<br/>&lt;em&gt;NOTE&lt;/em&gt;; You can close windows by clicking the tinted background known as the &#34;overlay&#34;.<br/>Clicking the overlay will have no effect if the &#34;modal&#34; parameter is passed, o&#114; if the<br/>overlay is disabled.<br/>&lt;/div&gt;<br/><br/>2. AJAX -- view<br/>This example demonstrates the ajax parameter. The window&#39;s content is pulled from a remote source (Relative URL: examples/2.html) when its trigger is clicked. The trigger parameter is used assign a &#34;show trigger&#34; to element(s) with class ex2trigger.<br/>Please wait... loading<br/>Javascript<br/><br/>$().ready(function() {<br/>&nbsp;&nbsp;$(&#39;#ex2&#39;).jqm({ajax: &#39;examples/2.html&#39;, trigger: &#39;a.ex2trigger&#39;});<br/>});<br/><br/>CSS<br/><br/>/* jqModal base Styling courtesy of;<br/>&nbsp;&nbsp;Brice Burgess &lt;bhb@iceburg.net&gt; */<br/><br/>/* The Window&#39;s CSS z-index value is respected (takes priority). If none is supplied,<br/>&nbsp;&nbsp;the Window&#39;s z-index value will be set to 3000 by default (in jqModal.js). You<br/>&nbsp;&nbsp;can change this value by either;<br/>&nbsp;&nbsp;&nbsp;&nbsp;a) supplying one via CSS<br/>&nbsp;&nbsp;&nbsp;&nbsp;b) passing the &#34;zIndex&#34; parameter. E.g.&nbsp;&nbsp;(window).jqm({zIndex: 500}); */<br/>&nbsp;&nbsp;<br/>.jqmWindow {<br/>&nbsp;&nbsp;&nbsp;&nbsp;display: none;<br/>&nbsp;&nbsp;&nbsp;&nbsp;<br/>&nbsp;&nbsp;&nbsp;&nbsp;position: fixed;<br/>&nbsp;&nbsp;&nbsp;&nbsp;top: 17%;<br/>&nbsp;&nbsp;&nbsp;&nbsp;left: 50%;<br/>&nbsp;&nbsp;&nbsp;&nbsp;<br/>&nbsp;&nbsp;&nbsp;&nbsp;margin-left: -300px;<br/>&nbsp;&nbsp;&nbsp;&nbsp;width: 600px;<br/>&nbsp;&nbsp;&nbsp;&nbsp;<br/>&nbsp;&nbsp;&nbsp;&nbsp;background-color: #EEE;<br/>&nbsp;&nbsp;&nbsp;&nbsp;color: #333;<br/>&nbsp;&nbsp;&nbsp;&nbsp;border: 1px solid black;<br/>&nbsp;&nbsp;&nbsp;&nbsp;padding: 12px;<br/>}<br/><br/>.jqmOverlay { background-color: #000; }<br/><br/>/* Fixed posistioning emulation for IE6<br/>&nbsp;&nbsp;&nbsp;&nbsp; Star sel&#101;ctor used to hide definition from browsers other than IE6<br/>&nbsp;&nbsp;&nbsp;&nbsp; For valid CSS, use a conditional include instead */<br/>* html .jqmWindow {<br/>&nbsp;&nbsp;&nbsp;&nbsp; position: absolute;<br/>&nbsp;&nbsp;&nbsp;&nbsp; top: e&#173;xpression((document.documentElement.scrollTop || document.body.scrollTop) + Math.round(17 * (document.documentElement.offsetHeight || document.body.clientHeight) / 100) + &#39;px&#39;);<br/>}<br/><br/>HTML<br/><br/>&lt;a href=&#34;#&#34; class=&#34;ex2trigger&#34;&gt;<br/>...<br/>&lt;div class=&#34;jqmWindow&#34; id=&#34;ex2&#34;&gt;<br/>Please wait... &lt;img src=&#34;inc/busy.gif&#34; alt=&#34;loading&#34; /&gt;<br/>&lt;/div&gt;<br/><br/>3. Styling -- a. view (dialog), b. view (alert), c. view (notice)<br/>This example demonstrates the ease in which stylish windows are constructed. All HTML and CSS is abstracted from the plugin which allows a designer unprecedented flexibility. Notice how custom overlays, ajax targets, and callbacks are used. I hope to eventually provide a repository of dialog themes. Interested in contributing? -- see note @ bottom of page.<br/><br/>Dialog Title<br/>Styled windows o&#114; dialogs are easy!<br/><br/>This particular theme was done for poMMo -- feel free to borrow the styling, o&#114; use it as a reference when creating your own. CSS and Markup is available under the HTML + CSS tabs of example 3a.<br/>Javascript<br/><br/>$().ready(function() {<br/>&nbsp;&nbsp;$(&#39;#ex3a&#39;).jqm({<br/>&nbsp;&nbsp;&nbsp;&nbsp;trigger: &#39;#ex3aTrigger&#39;,<br/>&nbsp;&nbsp;&nbsp;&nbsp;overlay: 30, /* 0-100 (int) : 0 is off/transparent, 100 is opaque */<br/>&nbsp;&nbsp;&nbsp;&nbsp;overlayClass: &#39;whiteOverlay&#39;})<br/>&nbsp;&nbsp;&nbsp;&nbsp;.jqDrag(&#39;.jqDrag&#39;); /* make dialog draggable, assign handle to title */<br/>&nbsp;&nbsp;<br/>&nbsp;&nbsp;// Close Button Highlighting. IE doesn&#39;t support :hover. Surprise?<br/>&nbsp;&nbsp;$(&#39;input.jqmdX&#39;)<br/>&nbsp;&nbsp;.hover(<br/>&nbsp;&nbsp;&nbsp;&nbsp;function(){ $(this).addClass(&#39;jqmdXFocus&#39;); }, <br/>&nbsp;&nbsp;&nbsp;&nbsp;function(){ $(this).removeClass(&#39;jqmdXFocus&#39;); })<br/>&nbsp;&nbsp;.focus( <br/>&nbsp;&nbsp;&nbsp;&nbsp;function(){ this.hideFocus=true; $(this).addClass(&#39;jqmdXFocus&#39;); })<br/>&nbsp;&nbsp;.blur( <br/>&nbsp;&nbsp;&nbsp;&nbsp;function(){ $(this).removeClass(&#39;jqmdXFocus&#39;); });<br/><br/>});<br/><br/>CSS<br/><br/>div.whiteOverlay { background: url(inc/jqmBG.gif) white; }<br/>div.jqDrag {cursor: move;}<br/><br/>/* jqmModal dialog CSS courtesy of;<br/>&nbsp;&nbsp;Brice Burgess &lt;bhb@iceburg.net&gt; */<br/><br/>div.jqmDialog {<br/>&nbsp;&nbsp;display: none;<br/>&nbsp;&nbsp;&nbsp;&nbsp;<br/>&nbsp;&nbsp;&nbsp;&nbsp;position: fixed;<br/>&nbsp;&nbsp;&nbsp;&nbsp;top: 17%;<br/>&nbsp;&nbsp;&nbsp;&nbsp;left: 50%;<br/>&nbsp;&nbsp;&nbsp;&nbsp;<br/>&nbsp;&nbsp;&nbsp;&nbsp;margin-left: -200px;<br/>&nbsp;&nbsp;width: 400px;<br/><br/>&nbsp;&nbsp;overflow: hidden;<br/>&nbsp;&nbsp;font-family:verdana,tahoma,helvetica;<br/>}<br/><br/>/* Fixed posistioning emulation for IE6<br/>&nbsp;&nbsp;&nbsp;&nbsp; Star sel&#101;ctor used to hide definition from browsers other than IE6<br/>&nbsp;&nbsp;&nbsp;&nbsp; For valid CSS, use a conditional include instead */<br/>* html div.jqmDialog {<br/>&nbsp;&nbsp;&nbsp;&nbsp; position: absolute;<br/>&nbsp;&nbsp;&nbsp;&nbsp; top: e&#173;xpression((document.documentElement.scrollTop || document.body.scrollTop) + Math.round(17 * (document.documentElement.offsetHeight || document.body.clientHeight) / 100) + &#39;px&#39;);<br/>}<br/><br/><br/>/* [[[ Title / Top Classes ]]] */<br/>div.jqmdTC { <br/>&nbsp;&nbsp;background: #d5ff84 url(dialog/sprite.gif) repeat-x 0px -82px; <br/>&nbsp;&nbsp;color: #528c00;<br/>&nbsp;&nbsp;padding: 7px 22px 5px 5px;<br/>&nbsp;&nbsp;font-family:&#34;sans serif&#34;,verdana,tahoma,helvetica;<br/>&nbsp;&nbsp;font-weight: bold;<br/>&nbsp;&nbsp;* zoom: 1;<br/>}<br/>div.jqmdTL { background:&nbsp;&nbsp;url(dialog/sprite.gif) no-repeat 0px -41px; padding-left: 3px;}<br/>div.jqmdTR { background: url(dialog/sprite.gif) no-repeat right 0px; padding-right: 3px; * zoom: 1;}<br/><br/><br/>/* [[[ Body / Message Classes ]]] */<br/>div.jqmdBC {<br/>&nbsp;&nbsp;background: url(dialog/bc.gif) repeat-x center bottom;<br/>&nbsp;&nbsp;padding: 7px 7px 7px;<br/>&nbsp;&nbsp;height: 180px;<br/>&nbsp;&nbsp;overflow: auto;<br/>}<br/>div.jqmdBL { background: url(dialog/bl.gif) no-repeat left bottom; padding-left: 7px; }<br/>div.jqmdBR { background: url(dialog/br.gif) no-repeat right bottom; padding-right: 7px; * zoom: 1 }<br/><br/>div.jqmdMSG { color: #317895; }<br/><br/><br/>/* [[[ Button classes ]]] */<br/>input.jqmdX {<br/>&nbsp;&nbsp;position: absolute;<br/>&nbsp;&nbsp;right: 7px;<br/>&nbsp;&nbsp;top: 4px;<br/>&nbsp;&nbsp;padding: 0 0 0 19px;<br/>&nbsp;&nbsp;height: 19px;<br/>&nbsp;&nbsp;width: 0px;<br/>&nbsp;&nbsp;background: url(dialog/close.gif) no-repeat top left;<br/>&nbsp;&nbsp;overflow: hidden;<br/>}<br/>input.jqmdXFocus {background-position: bottom left; outline: none;}<br/><br/>div.jqmdBC button, div.jqmdBC input[type=&#34;submit&#34;] {<br/>&nbsp;&nbsp;margin: 8px 10px 4px 10px;<br/>&nbsp;&nbsp;color: #777;<br/>&nbsp;&nbsp;background-color: #fff;<br/>&nbsp;&nbsp;cursor: pointer;<br/>}<br/><br/>div.jqmDialog input:focus, div.jqmDialog input.iefocus { background-color: #eaffc3; }<br/><br/>HTML<br/><br/>&lt;a href=&#34;#&#34; id=&#34;ex3aTrigger&#34;&gt;view&lt;/a&gt; (dialog)<br/>...<br/>&lt;div id=&#34;ex3a&#34; class=&#34;jqmDialog&#34;&gt;<br/>&lt;div class=&#34;jqmdTL&#34;&gt;&lt;div class=&#34;jqmdTR&#34;&gt;&lt;div class=&#34;jqmdTC jqDrag&#34;&gt;Dialog Title&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;<br/>&lt;div class=&#34;jqmdBL&#34;&gt;&lt;div class=&#34;jqmdBR&#34;&gt;&lt;div class=&#34;jqmdBC&#34;&gt;<br/><br/>&lt;div class=&#34;jqmdMSG&#34;&gt;<br/>Styled windows o&#114; dialogs are easy!<br/> <br/>&lt;br /&gt;&lt;br /&gt;<br/>This particular theme was done for &lt;a href=&#34;<a href="http://www.pommo.org" target="_blank" rel="external">http://www.pommo.org</a>&#34;&gt;poMMo&lt;/a&gt; --<br/>feel free to borrow the styling, o&#114; use it as a reference when creating your own.<br/>CSS and Markup is available under the HTML + CSS tabs of example 3a.<br/>&lt;/div&gt;<br/><br/>&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;<br/>&lt;input type=&#34;image&#34; src=&#34;dialog/close.gif&#34; class=&#34;jqmdX jqmClose&#34; /&gt;<br/>&lt;/div&gt;<br/><br/>&nbsp;&nbsp;3a (dialog) - custom overlay, draggable window.<br/><br/>Did you know?<br/>Close<br/><br/>Please wait... loading<br/>Javascript<br/><br/>$().ready(function() {<br/>&nbsp;&nbsp;<br/>&nbsp;&nbsp;// sel&#101;ct + reference &#34;triggering element&#34; -- will pass to $.jqm()<br/>&nbsp;&nbsp;var triggers = $(&#39;a.ex3bTrigger&#39;)[0];<br/>&nbsp;&nbsp;<br/>&nbsp;&nbsp;// NOTE; we could have used document.getElementById(), o&#114; sel&#101;cted<br/>&nbsp;&nbsp;//&nbsp;&nbsp;multiple elemets with $(..sel&#101;ctor..) and passed the trigger<br/>&nbsp;&nbsp;//&nbsp;&nbsp;as a jQuery object. o&#114;, just include the string &#39;#ex3btrigger&#39; <br/>&nbsp;&nbsp;//&nbsp;&nbsp;as the trigger parameter (as typically demonstrated).<br/>&nbsp;&nbsp;<br/>&nbsp;&nbsp;//&nbsp;&nbsp;NOTE; we supply a target for the ajax return. This allows us<br/>&nbsp;&nbsp;//&nbsp;&nbsp; to keep the structure of the alert window. An element can <br/>&nbsp;&nbsp;//&nbsp;&nbsp; also be passed (see the documentation) as target.<br/>&nbsp;&nbsp;<br/>&nbsp;&nbsp;$(&#39;#ex3b&#39;).jqm({<br/>&nbsp;&nbsp;&nbsp;&nbsp;trigger: triggers,<br/>&nbsp;&nbsp;&nbsp;&nbsp;ajax: &#39;examples/3b.html&#39;,<br/>&nbsp;&nbsp;&nbsp;&nbsp;target: &#39;div.jqmAlertContent&#39;,<br/>&nbsp;&nbsp;&nbsp;&nbsp;overlay: 0<br/>&nbsp;&nbsp;&nbsp;&nbsp;});<br/>&nbsp;&nbsp;<br/>&nbsp;&nbsp;// Close Button Highlighting. IE doesn&#39;t support :hover. Surprise?<br/>&nbsp;&nbsp;if($.browser.msie) {<br/>&nbsp;&nbsp;$(&#39;div.jqmAlert .jqmClose&#39;)<br/>&nbsp;&nbsp;.hover(<br/>&nbsp;&nbsp;&nbsp;&nbsp;function(){ $(this).addClass(&#39;jqmCloseHover&#39;); }, <br/>&nbsp;&nbsp;&nbsp;&nbsp;function(){ $(this).removeClass(&#39;jqmCloseHover&#39;); });<br/>&nbsp;&nbsp;}<br/>});<br/><br/>CSS<br/><br/>/* jqModal alert CSS courtesy of;<br/>&nbsp;&nbsp; Alexandre Plennevaux &lt;alexandre@pixeline.be&gt;,<br/>&nbsp;&nbsp; Brice Burgess &lt;bhb@iceburg.net&gt; */<br/><br/><br/>div.jqmAlert { /* contains + positions the alert window */<br/>&nbsp;&nbsp;display: none;<br/>&nbsp;&nbsp;<br/>&nbsp;&nbsp;position: fixed;<br/>&nbsp;&nbsp;top: 17%;<br/>&nbsp;&nbsp;width: 100%;<br/>}<br/>&nbsp;&nbsp;&nbsp;&nbsp;<br/>/* Fixed posistioning emulation for IE6<br/>&nbsp;&nbsp;&nbsp;&nbsp; Star sel&#101;ctor used to hide definition from browsers other than IE6<br/>&nbsp;&nbsp;&nbsp;&nbsp; For valid CSS, use a conditional include instead */<br/>* html div.jqmAlert {<br/>&nbsp;&nbsp;&nbsp;&nbsp; position: absolute;<br/>&nbsp;&nbsp;&nbsp;&nbsp; top: e&#173;xpression((document.documentElement.scrollTop || document.body.scrollTop) + Math.round(17 * (document.documentElement.offsetHeight || document.body.clientHeight) / 100) + &#39;px&#39;);<br/>}<br/><br/>div.jqmAlertWindow {<br/>&nbsp;&nbsp;height:auto;<br/>&nbsp;&nbsp;width: auto;<br/>&nbsp;&nbsp;margin: auto;<br/>&nbsp;&nbsp;<br/>&nbsp;&nbsp;max-width:400px;<br/>&nbsp;&nbsp;padding: 0 10px 10px;<br/>&nbsp;&nbsp;<br/>&nbsp;&nbsp;background:#111;<br/>&nbsp;&nbsp;border:1px dotted #FFF;<br/>}<br/><br/>.jqmAlertTitle{<br/>&nbsp;&nbsp;margin:5px 2px;<br/>&nbsp;&nbsp;height:20px;<br/>&nbsp;&nbsp;color:#FFF;<br/>&nbsp;&nbsp;background:#000;<br/>}<br/>.jqmAlertTitle h1{<br/>&nbsp;&nbsp;margin:5px 2px;<br/>&nbsp;&nbsp;padding-left:5px;<br/>&nbsp;&nbsp;padding:0;<br/>&nbsp;&nbsp;font-size:14px;<br/>&nbsp;&nbsp;text-transform:capitalize;<br/>&nbsp;&nbsp;letter-spacing:-1px;<br/>&nbsp;&nbsp;font-weight:bold;<br/>&nbsp;&nbsp;color:#FFF;<br/><br/>&nbsp;&nbsp;float:left;<br/>&nbsp;&nbsp;height:20px;<br/>}<br/><br/>div.jqmAlert .jqmClose em{display:none;}<br/>div.jqmAlert .jqmClose {<br/>&nbsp;&nbsp;width:20px;<br/>&nbsp;&nbsp;height:20px;<br/>&nbsp;&nbsp;display:block;<br/>&nbsp;&nbsp;float:right;<br/>&nbsp;&nbsp;clear:right;<br/>&nbsp;&nbsp;background:transparent url(alert/close_icon_double.png) 0 0 no-repeat;<br/>}<br/><br/>div.jqmAlert a.jqmClose:hover,div.jqmAlert a.jqmCloseHover{ background-position: 0 -20px; }<br/><br/>div.jqmAlertContent{<br/>&nbsp;&nbsp;border-top:px;<br/>&nbsp;&nbsp;color:#FFF;<br/>&nbsp;&nbsp;font:11px/14pt arial;<br/>&nbsp;&nbsp;padding:5px 20px 5px;<br/>&nbsp;&nbsp;margin:5px;<br/>&nbsp;&nbsp;border:1px dotted #111;<br/>&nbsp;&nbsp;letter-spacing:0px;<br/>&nbsp;&nbsp;background:#111 url(alert/darkgrid.png);<br/>}<br/><br/>/*掳掳掳掳掳掳掳掳掳掳掳掳掳掳掳掳掳掳掳掳掳掳掳掳掳掳掳掳掳掳掳掳掳掳掳掳掳掳掳掳掳掳掳掳掳掳掳掳掳<br/>&nbsp;&nbsp;clearing a float without additional markup<br/>&nbsp;&nbsp; <a href="http://www.positioniseverything.net/easyclearing.html" target="_blank" rel="external">http://www.positioniseverything.net/easyclearing.html</a> */<br/><br/>.clearfix:after {<br/>&nbsp;&nbsp;&nbsp;&nbsp;content: &#34;.&#34;; <br/>&nbsp;&nbsp;&nbsp;&nbsp;display: block; <br/>&nbsp;&nbsp;&nbsp;&nbsp;height: 0; <br/>&nbsp;&nbsp;&nbsp;&nbsp;clear: both; <br/>&nbsp;&nbsp;&nbsp;&nbsp;visibility: hidden;<br/>}<br/><br/>.clearfix {display: inline-block;}<br/><br/>/* Hides from IE-mac \*/<br/>* html .clearfix {height: 1%;}<br/>.clearfix {display: block;}<br/>/* End hide from IE-mac */<br/><br/>HTML<br/><br/>&lt;a href=&#34;#&#34; class=&#34;ex3bTrigger&#34;&gt;view&lt;/a&gt; (alert)<br/>...<br/>&lt;div class=&#34;jqmAlert&#34; id=&#34;ex3b&#34;&gt;<br/><br/>&lt;div id=&#34;ex3b&#34; class=&#34;jqmAlertWindow&#34;&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&lt;div class=&#34;jqmAlertTitle clearfix&#34;&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&lt;h1&gt;Did you know?&lt;/h1&gt;&lt;a href=&#34;#&#34; class=&#34;jqmClose&#34;&gt;&lt;em&gt;Close&lt;/em&gt;&lt;/a&gt;<br/>&nbsp;&nbsp;&lt;/div&gt;<br/>&nbsp;&nbsp;<br/>&nbsp;&nbsp;&lt;div class=&#34;jqmAlertContent&#34;&gt;<br/>&nbsp;&nbsp;&lt;p&gt;Please wait... &lt;img src=&#34;inc/busy.gif&#34; alt=&#34;loading&#34; /&gt;&lt;/p&gt;<br/>&nbsp;&nbsp;&lt;/div&gt;<br/>&lt;/div&gt;<br/><br/>&lt;/div&gt;<br/><br/>&nbsp;&nbsp;3b (alert) - ajax target.<br/><br/>Did you know?<br/><br/>Pine, spruce, o&#114; other evergreen wood should never be used in barbecues. These woods, when burning o&#114; smoking, can add harmful tar and resins to the food. Only hardwoods should be used for smoking and grilling, such as oak, pecan, hickory, maple, cherry, alder, apple, o&#114; mesquite, depending on the type of meat being cooked.<br/>close resize<br/>Javascript<br/><br/>// this example shows the use of onShow and onHide callbacks. Make<br/>// sure to read the documentation for futher instructions, and<br/>// an explanation of the &#34;hash&#34; argument.<br/><br/>$().ready(function() {<br/>&nbsp;&nbsp;$(&#39;#ex3c&#39;)<br/>&nbsp;&nbsp;&nbsp;&nbsp;.jqDrag(&#39;.jqDrag&#39;)<br/>&nbsp;&nbsp;&nbsp;&nbsp;.jqResize(&#39;.jqResize&#39;)<br/>&nbsp;&nbsp;&nbsp;&nbsp;.jqm({<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;trigger:&#39;#ex3cTrigger&#39;,<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;overlay: 0,<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;onShow: function(h) {<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* callback executed when a trigger click. Show notice */<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;h.w.css(&#39;opacity&#39;,0.92).slideDown(); <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;},<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;onHide: function(h) {<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* callback executed on window hide. Hide notice, overlay. */<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;h.w.slideUp(&#34;slow&#34;,function() { if(h.o) h.o.remove(); }); } <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});<br/>});<br/><br/>CSS<br/><br/>div.jqmNotice img.jqResize {position: absolute; right: 2px; bottom: 2px;}<br/><br/>/* Notice CSS courtesy of;<br/>&nbsp;&nbsp; Alexandre Plennevaux &lt;alexandre@pixeline.be&gt;,<br/>&nbsp;&nbsp; Brice Burgess &lt;bhb@iceburg.net&gt; */<br/><br/>div.jqmNotice {<br/>&nbsp;&nbsp;&nbsp;&nbsp;display: none;<br/>&nbsp;&nbsp;&nbsp;&nbsp;<br/>&nbsp;&nbsp;&nbsp;&nbsp;position: relative;<br/>&nbsp;&nbsp;&nbsp;&nbsp;<br/>&nbsp;&nbsp;&nbsp;&nbsp;width: 320px;<br/>&nbsp;&nbsp;background:#FFFFCC url(notice/note_icon.png) 5px 5px no-repeat;<br/>&nbsp;&nbsp;&nbsp;&nbsp;border: 1px solid #000;<br/>&nbsp;&nbsp;&nbsp;&nbsp;padding: 0;<br/>}<br/><br/>.jqmnTitle{margin: 0 25px;}<br/>&nbsp;&nbsp;<br/>.jqmnTitle h1{<br/>&nbsp;&nbsp;margin: 5px 0;<br/>&nbsp;&nbsp;padding-left:5px;<br/>&nbsp;&nbsp;width: 100%;<br/>&nbsp;&nbsp;<br/>&nbsp;&nbsp;font-size:10px;<br/>&nbsp;&nbsp;color:#FFFFCC;<br/>&nbsp;&nbsp;background-color:#505050;<br/>}<br/><br/>div.jqmNotice .jqmClose {<br/>&nbsp;&nbsp;position: absolute;<br/>&nbsp;&nbsp;cursor: pointer;<br/>&nbsp;&nbsp;right: 4px;<br/>&nbsp;&nbsp;top: 6px;<br/>}<br/><br/>.jqmnContent{<br/>&nbsp;&nbsp;border-top:1px;<br/>&nbsp;&nbsp;color:#000;<br/>&nbsp;&nbsp;font:12px/18pt Comic Sans, Comic Sans MS, cursive;<br/>&nbsp;&nbsp;padding:0 20px 5px;<br/>}<br/><br/>HTML<br/><br/>&lt;a href=&#34;#&#34; id=&#34;ex3cTrigger&#34;&gt;view&lt;/a&gt; (notice)<br/>...<br/>&lt;div style=&#34;position: absolute; margin: -100px 0 0 100px;&#34;&gt;<br/>&lt;div id=&#34;ex3c&#34; class=&#34;jqmNotice&#34;&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&lt;div class=&#34;jqmnTitle jqDrag&#34;&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;h1&gt;Did you know?&lt;/h1&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&lt;/div&gt;<br/>&nbsp;&nbsp;<br/>&nbsp;&nbsp;&lt;div class=&#34;jqmnContent&#34;&gt;<br/>&nbsp;&nbsp;&lt;p&gt;Pine, spruce, o&#114; other evergreen wood should never be used in barbecues. These woods, when burning o&#114; smoking, can add harmful tar and resins to the food. Only hardwoods should be used for smoking and grilling, such as oak, pecan, hickory, maple, cherry, alder, apple, o&#114; mesquite, depending on the type of meat being cooked.&lt;/p&gt;<br/>&nbsp;&nbsp;&lt;/div&gt;<br/>&nbsp;&nbsp;<br/>&nbsp;&nbsp;&lt;img src=&#34;notice/close_icon.png&#34; alt=&#34;close&#34; class=&#34;jqmClose&#34; /&gt;<br/>&nbsp;&nbsp;&lt;img src=&#34;dialog/resize.gif&#34; alt=&#34;resize&#34; class=&#34;jqResize&#34; /&gt;<br/>&lt;/div&gt;<br/>&lt;/div&gt;<br/><br/>&nbsp;&nbsp;3c (alert) - onShow, onHide callbacks.<br/>4. Modal, Nested Modal -- a. view (4a.html), b. view (4b.html)<br/>Focus can be forced on a dialog, making it a true &#34;modal&#34; dialog. Also exemplified is the ajax attribute sel&#101;ctor (using @href). Any DOM attribute can be used to extract the ajax url (see the documentation).<br/>Modal Dialog<br/><br/>Please wait... loading<br/>Modal Dialog<br/><br/>You bet!<br/><br/>Notice that you can only interact with this modal. If you click outside of it, focus will return to the form input element.<br/><br/>When this window is closed, the focus lock will resume on the calling modal window. This will repeat until there are no more modals open.<br/><br/>Use the &#34;z-index&#34; to control overlay and window overlap. See the documentation.<br/>Javascript<br/><br/>$().ready(function() {<br/>&nbsp;&nbsp;<br/>&nbsp;&nbsp;// notice that you can pass an element as the target <br/>&nbsp;&nbsp;//&nbsp;&nbsp;in addition to a string sel&#101;ctor.<br/>&nbsp;&nbsp;var t = $(&#39;#ex4 div.jqmdMSG&#39;);<br/>&nbsp;&nbsp;<br/>&nbsp;&nbsp;$(&#39;#ex4&#39;).jqm({<br/>&nbsp;&nbsp;&nbsp;&nbsp;trigger: &#39;a.ex4Trigger&#39;,<br/>&nbsp;&nbsp;&nbsp;&nbsp;ajax: &#39;@href&#39;, /* Extract ajax URL from the &#39;href&#39; attribute of triggering element */<br/>&nbsp;&nbsp;&nbsp;&nbsp;target: t,<br/>&nbsp;&nbsp;&nbsp;&nbsp;modal: true, /* FORCE FOCUS */<br/>&nbsp;&nbsp;&nbsp;&nbsp;onHide: function(h) { <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;t.html(&#39;Please Wait...&#39;);&nbsp;&nbsp;// Clear Content HTML on Hide.<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;h.o.remove(); // remove overlay<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;h.w.fadeOut(888); // hide window<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br/>&nbsp;&nbsp;&nbsp;&nbsp;},<br/>&nbsp;&nbsp;&nbsp;&nbsp;overlay: 0});<br/>&nbsp;&nbsp;<br/>&nbsp;&nbsp; // nested dialog<br/>&nbsp;&nbsp; $(&#39;#ex4c&#39;).jqm({modal: true, overlay: 10, trigger: false});<br/>&nbsp;&nbsp; <br/>&nbsp;&nbsp;// Close Button Highlighting Javascript provided in ex3a.<br/>&nbsp;&nbsp;<br/>&nbsp;&nbsp;// Work around for IE&#39;s lack of :focus CSS sel&#101;ctor<br/>&nbsp;&nbsp;if($.browser.msie)<br/>&nbsp;&nbsp;&nbsp;&nbsp;$(&#39;input&#39;)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.focus(function(){$(this).addClass(&#39;iefocus&#39;);})<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.blur(function(){$(this).removeClass(&#39;iefocus&#39;);});<br/>&nbsp;&nbsp;<br/>});<br/><br/>CSS<br/><br/>/* jqmModal dialog CSS inherited from Example 3a ... */<br/><br/>div.jqmdAbove { z-index: 5000; top: 8%; } /* used by 4c -- nested modal */<br/><br/>div.jqmdWide { width: 560px; margin-left: -280px; }<br/>div.jqmdTall { height: 330px; }<br/><br/><br/>div.centered { width: 100%; text-align: center; }<br/>div.buttons input{ margin: 10px 14px; }<br/>div.output { margin: 10px; color: red; }<br/><br/>.largeText { font-size: 120%; font-weight: bold; }<br/>.smallText { font-size: 85%; }<br/><br/>HTML<br/><br/>&lt;a href=&#34;examples/4a.html&#34; class=&#34;ex4Trigger&#34;&gt;view&lt;/a&gt; (4a.html)<br/> &lt;a href=&#34;examples/4b.html&#34; class=&#34;ex4Trigger&#34;&gt;view&lt;/a&gt; (4b.html)<br/>...<br/>&lt;div id=&#34;ex4&#34; class=&#34;jqmDialog jqmdWide&#34;&gt;<br/>&lt;div class=&#34;jqmdTL&#34;&gt;&lt;div class=&#34;jqmdTR&#34;&gt;&lt;div class=&#34;jqmdTC&#34;&gt;Modal Dialog&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;<br/>&lt;div class=&#34;jqmdBL&#34;&gt;&lt;div class=&#34;jqmdBR&#34;&gt;&lt;div class=&#34;jqmdBC&#34;&gt;<br/><br/>&lt;div class=&#34;jqmdMSG&#34;&gt;<br/>&lt;p&gt;Please wait... &lt;img src=&#34;inc/busy.gif&#34; alt=&#34;loading&#34; /&gt;&lt;/p&gt;<br/>&lt;/div&gt;<br/><br/>&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;<br/>&lt;input type=&#34;image&#34; src=&#34;dialog/close.gif&#34; class=&#34;jqmdX jqmClose&#34; /&gt;<br/>&lt;/div&gt;<br/><br/><br/>&lt;!-- nested dialog --&gt;<br/>&lt;div id=&#34;ex4c&#34; class=&#34;jqmDialog jqmdAbove&#34;&gt;<br/>&lt;div class=&#34;jqmdTL&#34;&gt;&lt;div class=&#34;jqmdTR&#34;&gt;&lt;div class=&#34;jqmdTC&#34;&gt;Modal Dialog&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;<br/>&lt;div class=&#34;jqmdBL&#34;&gt;&lt;div class=&#34;jqmdBR&#34;&gt;&lt;div class=&#34;jqmdBC jqmdTall&#34;&gt;<br/><br/>&lt;div class=&#34;jqmdMSG&#34;&gt;<br/>&lt;p class=&#34;largeText&#34;&gt;You bet!&lt;/p&gt;<br/><br/>&lt;p&gt;Notice that you can only interact with this modal.<br/>If you click outside of it, focus will return to the form input element.<br/>&lt;/p&gt;<br/><br/>&lt;input type=&#34;text&#34; size=&#34;15&#34; value=&#34;I get focus&#34;/&gt;<br/>&lt;input type=&#34;text&#34; size=&#34;15&#34; value=&#34;&#34;/&gt;<br/><br/>&lt;p&gt;<br/>When this window is closed, the focus lock will resume on the calling <br/>modal window. This will repeat until there are no more modals open.<br/>&lt;/p&gt;<br/><br/>&lt;p&gt;<br/>Use the &#34;z-index&#34; to control overlay and window overlap. See the &lt;a href=&#34;README&#34;&gt;documentation&lt;/a&gt;.<br/>&lt;/p&gt;<br/>&lt;/div&gt;<br/><br/>&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;<br/>&lt;input type=&#34;image&#34; src=&#34;dialog/close.gif&#34; class=&#34;jqmdX jqmClose&#34; /&gt;<br/>&lt;/div&gt;<br/><br/>5. Multi-Show/Hide -- a. view (show all), b. view (hide all), c. view (show+hide some)<br/>Triggers can cotrol more than 1 jqModal. You can assign new show o&#114; hide triggers to any jqModal element with $.jqmAddTrigger and $.jqmAddClose.<br/>Square A<br/>Square B<br/>Square D<br/>Square C<br/>Javascript<br/><br/>$().ready(function() {<br/>&nbsp;&nbsp;var show = $(&#39;#ex5show&#39;);<br/>&nbsp;&nbsp;var hide = $(&#39;#ex5hide&#39;);<br/>&nbsp;&nbsp;<br/>&nbsp;&nbsp;$(&#39;div.square&#39;)<br/>&nbsp;&nbsp;&nbsp;&nbsp;.jqm({overlay: 0, trigger: false})<br/>&nbsp;&nbsp;&nbsp;&nbsp;//.jqDrag()<br/>&nbsp;&nbsp;&nbsp;&nbsp;.jqmAddTrigger(show)<br/>&nbsp;&nbsp;&nbsp;&nbsp;.jqmAddClose(hide)<br/>&nbsp;&nbsp;&nbsp;&nbsp;<br/>&nbsp;&nbsp;$(&#39;#ex5multi&#39;).click(function() {<br/>&nbsp;&nbsp;&nbsp;&nbsp;$(&#39;div.square:even&#39;).jqmShow();<br/>&nbsp;&nbsp;&nbsp;&nbsp;$(&#39;div.square:odd&#39;).jqmHide();<br/>&nbsp;&nbsp;&nbsp;&nbsp;return false;<br/>&nbsp;&nbsp;});<br/>});<br/><br/>CSS<br/><br/>div.square {<br/>&nbsp;&nbsp;display: none;<br/>&nbsp;&nbsp;height: 88px;<br/>&nbsp;&nbsp;width: 88px;<br/>&nbsp;&nbsp;font-size: 10px;<br/>&nbsp;&nbsp;padding: 5px;<br/>&nbsp;&nbsp;border: 1px solid;<br/>&nbsp;&nbsp;position: absolute;<br/>}<br/><br/>div.square.a{<br/>&nbsp;&nbsp;background: #EEE;<br/>&nbsp;&nbsp;color: #777;<br/>&nbsp;&nbsp;border-color: #777;<br/>&nbsp;&nbsp;margin: 0 0 0 300px;<br/>}<br/><br/>div.square.b{<br/>&nbsp;&nbsp;background: #FFF6E5;<br/>&nbsp;&nbsp;color: #FF8000;<br/>&nbsp;&nbsp;border-color: #FF8000;<br/>&nbsp;&nbsp;margin: -300px 0 0 300px;<br/>}<br/><br/>div.square.c{<br/>&nbsp;&nbsp;background: #DDF0BD;<br/>&nbsp;&nbsp;color: green;<br/>&nbsp;&nbsp;border-color: green;<br/>&nbsp;&nbsp;margin: 0 0 0 600px;<br/>}<br/><br/>div.square.d{<br/>&nbsp;&nbsp;background: #FFF1F1;<br/>&nbsp;&nbsp;color: red;<br/>&nbsp;&nbsp;border-color: red;<br/>&nbsp;&nbsp;margin: -300px 0 0 600px;<br/>}<br/><br/>HTML<br/><br/>&lt;a href=&#34;#&#34; id=&#34;ex5show&#34;&gt;view&lt;/a&gt; (show all)<br/>&lt;a href=&#34;#&#34; id=&#34;ex5hide&#34;&gt;view&lt;/a&gt; (hide all)<br/>&lt;a href=&#34;#&#34; id=&#34;ex5multi&#34;&gt;view&lt;/a&gt; (show+hide some)<br/>...<br/><br/>&lt;div class=&#34;squarePlacer&#34;&gt;<br/><br/>&lt;div class=&#34;square a&#34;&gt;<br/>Square A<br/>&lt;/div&gt;<br/><br/>&lt;div class=&#34;square b&#34;&gt;<br/>Square B<br/>&lt;/div&gt;<br/><br/>&lt;div class=&#34;square d&#34;&gt;<br/>Square D<br/>&lt;/div&gt;<br/><br/>&lt;div class=&#34;square c&#34;&gt;<br/>Square C<br/>&lt;/div&gt;<br/><br/>&lt;/div&gt;<br/><br/>6. FUN! Overrides -- a. view (alert), b. view (confirm)<br/>It is now time to show a real-world use for jqModal -- overriding the standard alert() and confirm dialogs! Note; due to the single threaded nature of javascript, the confirm() function must be passed a callback -- it does NOT return true/false.<br/>Warning!<br/>Close<br/>Confirmation por favor...<br/>Close<br/><br/>Continue?<br/>Javascript<br/><br/>/* Overriding Javascript&#39;s Alert Dialog */<br/><br/>function alert(msg) {<br/>&nbsp;&nbsp;$(&#39;#alert&#39;)<br/>&nbsp;&nbsp;&nbsp;&nbsp;.jqmShow()<br/>&nbsp;&nbsp;&nbsp;&nbsp;.find(&#39;div.jqmAlertContent&#39;)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.html(msg);<br/>}<br/><br/>$().ready(function() {<br/>&nbsp;&nbsp;$(&#39;#alert&#39;).jqm({overlay: 0, modal: true, trigger: false});<br/>&nbsp;&nbsp;<br/>&nbsp;&nbsp;// trigger an alert whenever links of class alert are pressed.<br/>&nbsp;&nbsp;$(&#39;a.alert&#39;).click(function() { <br/>&nbsp;&nbsp;&nbsp;&nbsp;alert(&#39;You Have triggered an alert!&#39;); <br/>&nbsp;&nbsp;&nbsp;&nbsp;return false;<br/>&nbsp;&nbsp;});<br/>});<br/><br/><br/>/* Overriding Javascript&#39;s Confirm Dialog */<br/><br/>// NOTE; A callback must be passed. It is executed on &#34;cotinue&#34;. <br/>//&nbsp;&nbsp;This differs from the standard confirm() function, which returns<br/>//&nbsp;&nbsp; only true o&#114; false!<br/><br/>// If the callback is a string, it will be considered a &#34;URL&#34;, and<br/>//&nbsp;&nbsp;followed.<br/><br/>// If the callback is a function, it will be executed.<br/><br/><br/>function confirm(msg,callback) {<br/>&nbsp;&nbsp;$(&#39;#confirm&#39;)<br/>&nbsp;&nbsp;&nbsp;&nbsp;.jqmShow()<br/>&nbsp;&nbsp;&nbsp;&nbsp;.find(&#39;p.jqmConfirmMsg&#39;)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.html(msg)<br/>&nbsp;&nbsp;&nbsp;&nbsp;.end()<br/>&nbsp;&nbsp;&nbsp;&nbsp;.find(&#39;:submit:visible&#39;)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.click(function(){<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if(this.value == &#39;yes&#39;)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(typeof callback == &#39;string&#39;) ?<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;window.location.href = callback :<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;callback();<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$(&#39;#confirm&#39;).jqmHide();<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});<br/>}<br/><br/><br/>$().ready(function() {<br/>&nbsp;&nbsp;$(&#39;#confirm&#39;).jqm({overlay: 88, modal: true, trigger: false});<br/>&nbsp;&nbsp;<br/>&nbsp;&nbsp;// trigger a confirm whenever links of class alert are pressed.<br/>&nbsp;&nbsp;$(&#39;a.confirm&#39;).click(function() { <br/>&nbsp;&nbsp;&nbsp;&nbsp;confirm(&#39;About to visit: &#39;+this.href+&#39; !&#39;,this.href); <br/>&nbsp;&nbsp;&nbsp;&nbsp;return false;<br/>&nbsp;&nbsp;});<br/>});<br/><br/>CSS<br/><br/>div.jqmConfirm input[type=&#34;submit&#34;] { padding: 4px; margin: 10px 30px; background: #000; color: #FFF; border: 1px solid #AAA; }<br/><br/>/* jqModal confirm CSS courtesy of;<br/>&nbsp;&nbsp; Alexandre Plennevaux &lt;alexandre@pixeline.be&gt;,<br/>&nbsp;&nbsp; Brice Burgess &lt;bhb@iceburg.net&gt; */<br/><br/>div.jqmConfirm { /* contains + positions the alert window */<br/>&nbsp;&nbsp;display: none;<br/>&nbsp;&nbsp;<br/>&nbsp;&nbsp;position: fixed;<br/>&nbsp;&nbsp;top: 17%;<br/>&nbsp;&nbsp;width: 100%;<br/>}<br/>&nbsp;&nbsp;&nbsp;&nbsp;<br/>/* Fixed posistioning emulation for IE6<br/>&nbsp;&nbsp;&nbsp;&nbsp; Star sel&#101;ctor used to hide definition from browsers other than IE6<br/>&nbsp;&nbsp;&nbsp;&nbsp; For valid CSS, use a conditional include instead */<br/>* html div.jqmConfirm {<br/>&nbsp;&nbsp;&nbsp;&nbsp; position: absolute;<br/>&nbsp;&nbsp;&nbsp;&nbsp; top: e&#173;xpression((document.documentElement.scrollTop || document.body.scrollTop) + Math.round(17 * (document.documentElement.offsetHeight || document.body.clientHeight) / 100) + &#39;px&#39;);<br/>}<br/><br/>div.jqmConfirmWindow {<br/>&nbsp;&nbsp;height:auto;<br/>&nbsp;&nbsp;width: auto;<br/>&nbsp;&nbsp;margin: auto;<br/>&nbsp;&nbsp;<br/>&nbsp;&nbsp;max-width:400px;<br/>&nbsp;&nbsp;padding: 0 10px 10px;<br/>&nbsp;&nbsp;<br/>&nbsp;&nbsp;background:#FFF;<br/>&nbsp;&nbsp;border:1px dotted #FFF;<br/>}<br/><br/>.jqmConfirmTitle{<br/>&nbsp;&nbsp;margin:5px 2px;<br/>&nbsp;&nbsp;height:20px;<br/>&nbsp;&nbsp;color:#000;<br/>&nbsp;&nbsp;background:#FFF;<br/>}<br/>.jqmConfirmTitle h1{<br/>&nbsp;&nbsp;margin:5px 2px;<br/>&nbsp;&nbsp;padding-left:5px;<br/>&nbsp;&nbsp;padding:0;<br/>&nbsp;&nbsp;font-size:14px;<br/>&nbsp;&nbsp;text-transform:capitalize;<br/>&nbsp;&nbsp;letter-spacing:-1px;<br/>&nbsp;&nbsp;font-weight:bold;<br/>&nbsp;&nbsp;color:#000;<br/><br/>&nbsp;&nbsp;float:left;<br/>&nbsp;&nbsp;height:20px;<br/>}<br/><br/>div.jqmConfirm .jqmClose em{display:none;}<br/>div.jqmConfirm .jqmClose {<br/>&nbsp;&nbsp;width:20px;<br/>&nbsp;&nbsp;height:20px;<br/>&nbsp;&nbsp;display:block;<br/>&nbsp;&nbsp;float:right;<br/>&nbsp;&nbsp;clear:right;<br/>&nbsp;&nbsp;background:transparent url(confirm/close_icon_double.png) 0 0 no-repeat;<br/>}<br/><br/>div.jqmConfirm a.jqmClose:hover{ background-position: 0 -20px; }<br/><br/>div.jqmConfirmContent{<br/>&nbsp;&nbsp;border-top:px;<br/>&nbsp;&nbsp;color:#000;<br/>&nbsp;&nbsp;font:11px/14pt arial;<br/>&nbsp;&nbsp;padding:5px 20px 5px;<br/>&nbsp;&nbsp;margin:5px;<br/>&nbsp;&nbsp;border:1px dotted #111;<br/>&nbsp;&nbsp;letter-spacing:0px;<br/>&nbsp;&nbsp;background:#FFF url(confirm/darkgrid.png);<br/>}<br/><br/>/*掳掳掳掳掳掳掳掳掳掳掳掳掳掳掳掳掳掳掳掳掳掳掳掳掳掳掳掳掳掳掳掳掳掳掳掳掳掳掳掳掳掳掳掳掳掳掳掳掳<br/>&nbsp;&nbsp;clearing a float without additional markup<br/>&nbsp;&nbsp; <a href="http://www.positioniseverything.net/easyclearing.html" target="_blank" rel="external">http://www.positioniseverything.net/easyclearing.html</a> */<br/><br/>.clearfix:after {<br/>&nbsp;&nbsp;&nbsp;&nbsp;content: &#34;.&#34;; <br/>&nbsp;&nbsp;&nbsp;&nbsp;display: block; <br/>&nbsp;&nbsp;&nbsp;&nbsp;height: 0; <br/>&nbsp;&nbsp;&nbsp;&nbsp;clear: both; <br/>&nbsp;&nbsp;&nbsp;&nbsp;visibility: hidden;<br/>}<br/><br/>.clearfix {display: inline-block;}<br/><br/>/* Hides from IE-mac \*/<br/>* html .clearfix {height: 1%;}<br/>.clearfix {display: block;}<br/>/* End hide from IE-mac */<br/><br/>HTML<br/><br/>&lt;a href=&#34;#&#34; class=&#34;alert&#34;&gt;view&lt;/a&gt; (alert)<br/>&lt;a href=&#34;#&#34; class=&#34;confirm&#34;&gt;view&lt;/a&gt; (confirm)<br/>...<br/>&lt;!-- Alert Dialog --&gt;<br/>&lt;div class=&#34;jqmAlert&#34; id=&#34;alert&#34;&gt;<br/><br/>&lt;div id=&#34;ex3b&#34; class=&#34;jqmAlertWindow&#34;&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&lt;div class=&#34;jqmAlertTitle clearfix&#34;&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&lt;h1&gt;Warning!&lt;/h1&gt;&lt;a href=&#34;#&#34; class=&#34;jqmClose&#34;&gt;&lt;em&gt;Close&lt;/em&gt;&lt;/a&gt;<br/>&nbsp;&nbsp;&lt;/div&gt;<br/>&nbsp;&nbsp;<br/>&nbsp;&nbsp;&lt;div class=&#34;jqmAlertContent&#34;&gt;&lt;/div&gt;<br/>&lt;/div&gt;<br/><br/>&lt;/div&gt;<br/><br/><br/><br/>&lt;!-- Confirm Dialog --&gt;<br/>&lt;div class=&#34;jqmConfirm&#34; id=&#34;confirm&#34;&gt;<br/><br/>&lt;div id=&#34;ex3b&#34; class=&#34;jqmConfirmWindow&#34;&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&lt;div class=&#34;jqmConfirmTitle clearfix&#34;&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&lt;h1&gt;Confirmation por favor...&lt;/h1&gt;&lt;a href=&#34;#&#34; class=&#34;jqmClose&#34;&gt;&lt;em&gt;Close&lt;/em&gt;&lt;/a&gt;<br/>&nbsp;&nbsp;&lt;/div&gt;<br/>&nbsp;&nbsp;<br/>&nbsp;&nbsp;&lt;div class=&#34;jqmConfirmContent&#34;&gt;<br/>&nbsp;&nbsp;&lt;p class=&#34;jqmConfirmMsg&#34;&gt;&lt;/p&gt;<br/>&nbsp;&nbsp;&lt;p&gt;Continue?&lt;/p&gt;<br/>&nbsp;&nbsp;&lt;/div&gt;<br/>&nbsp;&nbsp;<br/>&nbsp;&nbsp;&lt;input type=&#34;submit&#34; value=&#34;no&#34; /&gt;<br/>&nbsp;&nbsp;&lt;input type=&#34;submit&#34; value=&#34;yes&#34; /&gt;<br/>&nbsp;&nbsp;&lt;/p&gt;<br/>&nbsp;&nbsp;<br/>&lt;/div&gt;<br/><br/>&lt;/div&gt;<br/><br/>7. External Site (iframe) usage (with added bling-in-the-box)<br/>Alexandre Plennevaux has posted a tutorial on effectively using jqModal to load external sites into a popup dialog. His method up&#100;ates an iframe inside a dialog with the HREF attribute of the triggering element. It is an excellent example of real-world jqModal usage. As an added bonus; the bling-factor is furthered by showing off some fancy animated transistions! Be sure to check out his demonstration.<br/>Etc.<br/><br/>Previous Releases<br/>All revisions of jqModal are available are available here.<br/><br/>Known Issues, Pending Fixes<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* Up&#100;ate jqDnR, make squares draggable<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* Demonstrate an enhanced slideshow<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* Incorporate &#34;smart&#34; modal focus routine<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* Abstract IE6 workarounds from base CSS, use conditional includes<br/><br/>R14 Changes<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;Changes include smart detection of the triggering element. This allows you to call $.jqmShow() and $.jqmHide() within the event context of a non-initialized triggering element, and that element will mask a proper initialized trigger.<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;This (very minor) change is intended to improve the plugin&#39;s natural behavior -- that is; to behave as expected. It will make &#34;live querying&#34; modal triggers easier for some.<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;A simple example of the new behavior is shown below. It will show and load the remote content of all anchor links into the modal window whenever they are clicked.<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;&lt;a href=&#34;<a href="http://my.ajax/content" target="_blank" rel="external">http://my.ajax/content</a>&#34;&gt;open modal with my.ajax/content&lt;/a&gt;<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;&lt;div id=&#34;jqModal&#34; class=&#34;jqmWindow&#34; style=&#34;display: none;&#34;&gt;&lt;/div&gt;<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;&lt;script type=&#34;text/javascript&#34;&gt;<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;jQuery().ready(function($){<br/>&nbsp;&nbsp;&nbsp;&nbsp; <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// initialize modal,<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// load the container with a remote return based on the &#39;href&#39;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;&nbsp;&nbsp;&nbsp;attribute of triggering element(s)<br/>&nbsp;&nbsp;&nbsp;&nbsp; <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$(&#39;#jqModal&#39;).jqm({ajax:&#39;@href&#39;});<br/>&nbsp;&nbsp;&nbsp;&nbsp; <br/>&nbsp;&nbsp;&nbsp;&nbsp; <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// open the modal whenever anchor links on the page are clicked<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $(&#39;a&#39;).live(&#39;click&#39;,function(){<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$(&#39;#jqModal&#39;).jqmShow();<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});<br/>&nbsp;&nbsp;&nbsp;&nbsp; <br/>&nbsp;&nbsp;&nbsp;&nbsp; <br/>&nbsp;&nbsp;&nbsp;&nbsp;});<br/>&nbsp;&nbsp;&nbsp;&nbsp;&lt;/script&gt;<br/><br/>R13 Changes<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* Minor code optimizations<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* Fixed potential exception in modal focus routine<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* Overlays of modal dialogs are no longer automatically styled with a &#34;wait&#34; cursor. Use CSS to control<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* Exposed overiding of default parameter values via the $.jqm.params global<br/><br/>R12 Changes<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* Now dual licensed under the MIT and GPL licenses<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* Compatibility with jQuery 1.2.6<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* Removed zIndex parameter<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* Subsequent $.jqm calls now up&#100;ate configuration<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* AJAX target is now cleared before load<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* Added ajaxText parameter<br/><br/>R11 Changes<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* added toTop argument to break z-Index container restraints (demo)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* improved focus method tolerance<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* overlay now takes z-Index stacking o&#114;der precedence<br/><br/>Earlier Release Changes<br/><br/>R10 Changes;<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;* focus element re-calculated every modal click to prevent IE error<br/>&nbsp;&nbsp;&nbsp;&nbsp;* ie6 sets body width to 100%<br/>&nbsp;&nbsp;&nbsp;&nbsp;* Require fixed pushStack,$.browser.version -- jQuery 1.1.3.1 MINIMUM!<br/>&nbsp;&nbsp;&nbsp;&nbsp;* compressible with a javascript packer<br/>&nbsp;&nbsp;&nbsp;&nbsp;* HTTPS/SSL served iFrame content will not throw warnings in IE<br/><br/><br/><br/>R8,R9 Changes<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;* Up&#100;ated CSS, Sync up.<br/>&nbsp;&nbsp;&nbsp;&nbsp;* Fixed IE crash when ajax loaded elements used as trigger(s)<br/>&nbsp;&nbsp;&nbsp;&nbsp;* IE6 - overlay now covers dialog only, allowing page interaction when overlay: 0<br/><br/><br/><br/>R7 Changes<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;* Added $.jqmShow, $.jqmHide to manually hide/show dialogs<br/>&nbsp;&nbsp;&nbsp;&nbsp;* Added $.jqmAddTrigger and $.jqmAddClose to bind show/hide to elements<br/>&nbsp;&nbsp;&nbsp;&nbsp;* Added onLoad callback (called after ajax return)<br/>&nbsp;&nbsp;&nbsp;&nbsp;* Added support for handling multiple dialogs @ once across ALL functions<br/>&nbsp;&nbsp;&nbsp;&nbsp;* Removed auto-fire parameter, replaced via $(e).jqm().jqmShow()<br/>&nbsp;&nbsp;&nbsp;&nbsp;* Removed $.jqmClose()<br/>&nbsp;&nbsp;&nbsp;&nbsp;* Removed &#34;wrapClass&#34; parameter, up&#100;ated base CSS<br/>&nbsp;&nbsp;&nbsp;&nbsp;* CSS z-index value takes priority over &#34;zIndex&#34; parameter<br/>&nbsp;&nbsp;&nbsp;&nbsp;* Triggers can hide, show, o&#114; hide AND show jqModals<br/>&nbsp;&nbsp;&nbsp;&nbsp;* Overlays+IE6 iframe are now fixed positioned - support for ie6 quirks + standards mode<br/>&nbsp;&nbsp;&nbsp;&nbsp;* Internal Improvements, no event data<br/><br/><br/>]]></summary>
	  <link rel="alternate" type="text/html" href="http://www.mdrt.org.cn/article/35.htm" /> 
	  <id>http://www.mdrt.org.cn/default.asp?id=35</id>
  </entry>	
		
  <entry>
	  <title type="html"><![CDATA[屏蔽XP欢迎屏幕提示未读邮件]]></title>
	  <author>
		 <name>jbkadmin</name>
		 <uri>http://www.mdrt.org.cn/</uri>
		 <email>anyshe@126.com</email>
	  </author>
	  <category term="" scheme="http://www.mdrt.org.cn/default.asp?cateID=7" label="常见问题" /> 
	  <updated>2010-06-11T09:09:53+08:00</updated>
	  <published>2010-06-11T09:09:53+08:00</published>
		  <summary type="html"><![CDATA[在HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\UnreadMail键下面找到。<br/>　　在UnreadMail下面创建一个Message ExpiryDays子键并将它设置为0可以禁止XP的欢迎屏幕显示未读邮件。不过修改注册表不是很方便，用TweakUI修改既简单又安全。安装并启动 TweakUI，依次选择Logon→Unread mail，清除Show unread mail on Welcome screen选项。]]></summary>
	  <link rel="alternate" type="text/html" href="http://www.mdrt.org.cn/article/34.htm" /> 
	  <id>http://www.mdrt.org.cn/default.asp?id=34</id>
  </entry>	
		
  <entry>
	  <title type="html"><![CDATA[Compare two images with C#]]></title>
	  <author>
		 <name>jbkadmin</name>
		 <uri>http://www.mdrt.org.cn/</uri>
		 <email>anyshe@126.com</email>
	  </author>
	  <category term="" scheme="http://www.mdrt.org.cn/default.asp?cateID=7" label="常见问题" /> 
	  <updated>2010-05-27T15:34:16+08:00</updated>
	  <published>2010-05-27T15:34:16+08:00</published>
		  <summary type="html"><![CDATA[<br/> public enum CompareResult<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ciCompareOk,<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ciPixelMismatch,<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ciSizeMismatch<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;};<br/>&nbsp;&nbsp;public static CompareResult Compare(Image bmp1, Image bmp2)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CompareResult cr = CompareResult.ciCompareOk;<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//Test to see if we have the same size of image<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (bmp1.Size != bmp2.Size)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cr = CompareResult.ciSizeMismatch;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;else<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//Convert each image to a byte array<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System.Drawing.ImageConverter ic = new System.Drawing.ImageConverter();<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;byte[] btImage1 = new byte[1];<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;btImage1 = (byte[])ic.ConvertTo(bmp1, btImage1.GetType());<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;byte[] btImage2 = new byte[1];<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;btImage2 = (byte[])ic.ConvertTo(bmp2, btImage2.GetType());<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//Compute a hash for each image<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SHA256Managed shaM = new SHA256Managed();<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;byte[] hash1 = shaM.ComputeHash(btImage1);<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;byte[] hash2 = shaM.ComputeHash(btImage2);<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//Compare the hash values<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for (int i = 0; i &lt; hash1.Length &amp;&amp; i &lt; hash2.Length<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&amp;&amp; cr == CompareResult.ciCompareOk; i++)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (hash1[i] != hash2[i])<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cr = CompareResult.ciPixelMismatch;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br/>]]></summary>
	  <link rel="alternate" type="text/html" href="http://www.mdrt.org.cn/article/33.htm" /> 
	  <id>http://www.mdrt.org.cn/default.asp?id=33</id>
  </entry>	
		
  <entry>
	  <title type="html"><![CDATA[spa1001Dial Plan的语法规则]]></title>
	  <author>
		 <name>jbkadmin</name>
		 <uri>http://www.mdrt.org.cn/</uri>
		 <email>anyshe@126.com</email>
	  </author>
	  <category term="" scheme="http://www.mdrt.org.cn/default.asp?cateID=5" label="硬件" /> 
	  <updated>2010-03-29T10:44:39+08:00</updated>
	  <published>2010-03-29T10:44:39+08:00</published>
		  <summary type="html"><![CDATA[以Vbuzzer为例设置如下：国内电话费率为每分钟1美分，约6.8分钱人民币，更多其他国家费率请看<a href="http://www.vbuzzer.com/cn/cn_ld_pg.php" target="_blank" rel="external">http://www.vbuzzer.com/cn/cn_ld_pg.php</a> 网站<br/><br/>Proxy:&nbsp;&nbsp;&nbsp;&nbsp;（Vbuzzer.com:80）<br/><br/>User ID:&nbsp;&nbsp; (Vbuzzer申请的用户名)<br/><br/>Password:&nbsp;&nbsp;(Vbuzzer用户名的密码)<br/><br/>Dial Plan : (1xxxxxxxxxS0|&lt;0:01186&gt;xxxxxxxxxxxS0&gt;|&lt;0:01186&gt;x.|&lt;:0118620&gt;x.|&lt;*:011&gt;x.)<br/><br/> <br/><br/>Dial Plan为拨号规则，上面的设置包括“（）”一同复制才可以，说明如下：<br/><br/>1、拨打内部号码：直接拨打1开头的10位数内部号码（Vbuzzer 功能，无论在世界上的哪个角落内部通话完全免费）<br/><br/>2、拨打手机：0+手机号码（11位数的手机号码）<br/><br/>3、拨打固话小灵通：区号+电话号码<br/><br/>4、拨打本地（广州:020）固话小灵通：直接拨打本地号码<br/><br/>5、拨打国际长途：* + 国家代码 + 区号 + 电话号码&nbsp;&nbsp;&nbsp;&nbsp;（国家代码和区号前面的“0”去掉）<br/><br/>其中第四段如果是其它城市如深圳0755则把20改为 755。如果需要自行设置请看下面语法规则：<br/><br/> <br/><br/>以实例说明Dial Plan的语法规则<br/>如( *xx | [3469]11 | 0 | 00 | &lt;:1408&gt;[2-9]xxxxxx | 1[2-9]xx[2-9]xxxxxx | 011x. )<br/>１．其中每条规则之间使用“ | ”隔开，整个Dial Plan 需用双括号括住。<br/>２．如需将所拨号码立即拨出，可以在号码后加拨“S0”。<br/>３．x 代表０－９之间任意一个键。<br/>４．［］代表可取括号中任意一个数，如［７８９］代表可取７，８，９中任意一个键，［２３５－７*］代表可在２，３，５，６，７，*中取任意一个键。<br/>５．&lt;:&gt; 可用于拨号头的替换，如&lt;8:1650&gt;xxxxxxx 当你拨打“８５５５１２１２”，而实际发送出去的号码是“１６５０５５５５１２１２”<br/>６．9, 1xxxxxxxxxx，逗号代表发送拨号音，等待继续拨号。<br/>７．190xxxxxxx!，规则后带有叹号，表示符合该规则的拨号被禁用，无法拨出。<br/>８．设置拨号超时时间，可在双括号前加入“Ｌ＝８，Ｓ＝４”，代表超时间为８秒。<br/>９．011x.，x后面的点号代表与前一项定义相同，不限制长度，所以01122,011223,0112234都符合规则<br/>范例：<br/>( 1 xxx xxxxxxx ) 　表示拨打美国号码，前面的xxx代表区码<br/>( 1 xxx xxxxxxx | &lt;:1212&gt; xxxxxxx ) 　表示如果只拨入７个号，则自动加入前码１２１２用于拨本地号码<br/>( &lt;9,:&gt; 1 xxx xxxxxxx | &lt;8,:1212&gt; xxxxxxx ) ９和８用于小总机拨外线的预拨号码，当拨９或８时，可听到等待音<br/>S:4, ( 00 | 011 xxxxx x. ) 　设置的短超时为４秒，只可拨打００或以０１１开头的号码<br/>( 0 | [49]11 | 1 [2-9]xx [2-9]xxxxxx ) 　用于直拨４１１或９１１<br/>( 1 [2-8]xx [2-9]xxxxxx ) 　典型的美国电话规则<br/>( 1 947 xxxxxxx ! | 1 xxx xxxxxxx ) 　禁拨区号为９４７的电话<br/>( S0 &lt;:12125551234&gt; ) 　热线拨出，拿起电话，自动拨出号码12125551234]]></summary>
	  <link rel="alternate" type="text/html" href="http://www.mdrt.org.cn/article/32.htm" /> 
	  <id>http://www.mdrt.org.cn/default.asp?id=32</id>
  </entry>	
		
  <entry>
	  <title type="html"><![CDATA[serv u9.3.0.1 过期问题解决]]></title>
	  <author>
		 <name>jbkadmin</name>
		 <uri>http://www.mdrt.org.cn/</uri>
		 <email>anyshe@126.com</email>
	  </author>
	  <category term="" scheme="http://www.mdrt.org.cn/default.asp?cateID=3" label="大杂烩" /> 
	  <updated>2010-03-23T13:22:56+08:00</updated>
	  <published>2010-03-23T13:22:56+08:00</published>
		  <summary type="html"><![CDATA[serv u9.3.0.1 使用注册机后过一段时间就会变成未注册状态，有时一天要绿化两次很是麻烦。<br/><br/>如果在使用一段时间后，出现反弹（运行一天后服务自动停止）的现象，可以停止serv-u服务后将注册表项”HKEY_LOCAL_MACHINE\SOFTWARE\Onihr 删除，再重启serv-u服务可以坚持一个月不反弹。]]></summary>
	  <link rel="alternate" type="text/html" href="http://www.mdrt.org.cn/article/31.htm" /> 
	  <id>http://www.mdrt.org.cn/default.asp?id=31</id>
  </entry>	
		
  <entry>
	  <title type="html"><![CDATA[IE提示“存储空间不足，无法完成此操作”的错误（彻底解决包括产生原因）]]></title>
	  <author>
		 <name>jbkadmin</name>
		 <uri>http://www.mdrt.org.cn/</uri>
		 <email>anyshe@126.com</email>
	  </author>
	  <category term="" scheme="http://www.mdrt.org.cn/default.asp?cateID=6" label="网页脚本类" /> 
	  <updated>2010-03-12T11:32:53+08:00</updated>
	  <published>2010-03-12T11:32:53+08:00</published>
		  <summary type="html"><![CDATA[1、打开IE的“关于”，会报错：近期有大量的客户投诉是关于在脚本运行过程IE报告“存储空间不足，无法完成此操作”的。出现此问题的用户全部都无法访问IE的“帮助——关于”页面，报告相同的错误。<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;2、用showModalDialog打开的窗口里，用到获取浏览器版本(navigator.userAgent)的时候会出现<br/><br/>“存储空间不足，无法完成此操作”的错误，导致这个页面的在它之后的其他Script都不好使，对于业务系统，产生的后果非常之严重。<br/><br/>测试脚本：<br/><br/>&lt;button onclick=test()&gt;Test &lt;/button&gt;<br/>&lt;SCRIPT&gt;<br/>function test(){<br/>showModalDialog(&#34;javascript:alert(navigator.userAgent);&#34;);<br/>}<br/>&lt;/SCRIPT&gt;<br/><br/>今天终于找到真正的原因是注册表里的内容被修改了，至于被什么软件修改了请大家自己检查一下注册表里的项即可。具体的注册表位置是两个地方：<br/><br/>HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Windows \ CurrentVersion \ Internet Settings \ 5.0 \ User Agent<br/><br/>与<br/><br/>HKEY_CURRENT_USER \ SOFTWARE \ Microsoft \ Windows \ CurrentVersion \ Internet Settings \ 5.0 \ User Agent<br/><br/>在我的机器上发现我的 HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\User Agent\Post Platform 有一个字符串的键值被改为：EmbeddedWB 14.52 from: <a href="http://www.bsalsa.com/" target="_blank" rel="external">http://www.bsalsa.com/</a> EmbeddedWB 14.52&nbsp;&nbsp;就是因为这个键名太长了，所以导致通过javascript取的时候报错，检查这两个位置下的键名是否有这样的情况，修改后，重启机器，即可解决该问题。<br/><br/>参考：<a href="http://www.winhelponline.com/articles/35/1/Windows-Up" target="_blank" rel="external">http://www.winhelponline.com/articles/35/1/Windows-Up</a>&#100;ate-page- says-Thank-you-for-your-interest-in-obtaining-up&#100;ates-from-our-site.html<br/><br/>以下是原先的理解：<br/><br/>也有不少的狗友们发现了这个问题，卸载KuGoo2007就好了，所以确认为KuGoo2007导致IE的问题。<br/><br/>解决办法：<br/><a href="http://service.kugoo.com/Display.asp?ID=96640" target="_blank" rel="external">http://service.kugoo.com/Display.asp?ID=96640</a> 关注这个回帖（这个被关掉了）<br/><br/>目前已知的解决办法。（我还没有试过，太麻烦了）<br/>可以肯定的是Kugoo2007 或者Kugoo mini播放器修改了注册表，使得IE6无法正常读取系统信息。解决方法如下：<br/>（1）下载并安装Windows xp版本的IE7；<br/>（2）安装完毕，并重启系统后运行IE7；<br/>（3）开启 工具－&gt;Internet选项-&gt;高级-&gt;还原设置，完成最彻底的还原。<br/><br/>执行完毕上述操作后，卸载IE7并重新启动系统，IE6恢复正常。<br/><br/>安装这个补丁据说可以修复次问题<br/><a href="http://support.microsoft.com/kb/945007" target="_blank" rel="external">http://support.microsoft.com/kb/945007</a><br/>下载：<a href="http://www.microsoft.com/downloads" target="_blank" rel="external">http://www.microsoft.com/downloads</a> /details.aspx?FamilyId=3F8BA2AA-ED73-4764-A56D-9515A9C500DE&amp;displaylang=en<br/>我试了，但解决不了。只好等kugoo出新版本来看看有没有办法解决，我现在已经安装了kugoo 4.024的版本了。还是不行。<br/><br/>我安装IE 8 就正常了，但用不了中国银行的网银，删除IE8再安装IE7，然后进入高级，重置全部，就正常啦，哈哈 ]]></summary>
	  <link rel="alternate" type="text/html" href="http://www.mdrt.org.cn/article/30.htm" /> 
	  <id>http://www.mdrt.org.cn/default.asp?id=30</id>
  </entry>	
		
  <entry>
	  <title type="html"><![CDATA[Lucene 3.0 原理与代码分析.pdf]]></title>
	  <author>
		 <name>jbkadmin</name>
		 <uri>http://www.mdrt.org.cn/</uri>
		 <email>anyshe@126.com</email>
	  </author>
	  <category term="" scheme="http://www.mdrt.org.cn/default.asp?cateID=6" label="网页脚本类" /> 
	  <updated>2010-03-08T14:49:04+08:00</updated>
	  <published>2010-03-08T14:49:04+08:00</published>
		  <summary type="html"><![CDATA[Lucene 3.0 原理与代码分析.pdf<img src="http://www.mdrt.org.cn/images/download.gif" alt="下载文件" style="margin:0px 2px -4px 0px"/> <a href="http://www.mdrt.org.cn/attachments/month_1003/p201038144854.pdf" target="_blank">点击下载此文件</a><br/>]]></summary>
	  <link rel="alternate" type="text/html" href="http://www.mdrt.org.cn/article/29.htm" /> 
	  <id>http://www.mdrt.org.cn/default.asp?id=29</id>
  </entry>	
		
  <entry>
	  <title type="html"><![CDATA[浅析ASP.NET回车提交事件]]></title>
	  <author>
		 <name>jbkadmin</name>
		 <uri>http://www.mdrt.org.cn/</uri>
		 <email>anyshe@126.com</email>
	  </author>
	  <category term="" scheme="http://www.mdrt.org.cn/default.asp?cateID=6" label="网页脚本类" /> 
	  <updated>2010-01-22T15:26:11+08:00</updated>
	  <published>2010-01-22T15:26:11+08:00</published>
		  <summary type="html"><![CDATA[ASP.NET回车提交事件其实说到底并不是ASP.NET 的编程问题，却是关于html form 中的submit 按钮就是如何规划的具体讨论。 也可归于ASP.NET编程的一部分，那么ASP.NET回车提交事件的具体实现是怎么样的呢？下面我们具体的看下：<br/><br/>ASP.NET回车提交事件实现1、<br/><br/>当你的光标焦点进入某个表单元素的时候，会激活该表单中第一个（流布局顺从左到右，从上至下） type=submit 的按钮（假如有），等待响应回车事件，并提交该form<br/><br/>你可以测试一下代码：<br/><br/>&nbsp;&nbsp; 1. ﹤form action=&#34;&#34;﹥<br/>&nbsp;&nbsp; 2. ﹤input type=&#34;text&#34; /﹥<br/>&nbsp;&nbsp; 3. ﹤input type=&#34;submit&#34; value=&#34;submit&#34; /﹥<br/>&nbsp;&nbsp; 4. ﹤/form﹥<br/>&nbsp;&nbsp; 5. ﹤form action=&#34;&#34;﹥<br/>&nbsp;&nbsp; 6. ﹤input type=&#34;text&#34; /﹥<br/>&nbsp;&nbsp; 7. ﹤input type=&#34;button&#34; value=&#34;submit&#34; /﹥<br/>&nbsp;&nbsp; 8. ﹤/form﹥ <br/><br/>ASP.NET回车提交事件实现2.<br/><br/>在 ASP.NET 2.0 中 button 默认呈现为 ﹤input type=submit﹥ 此时不要额外脚本提交form ，submit 按钮就是设计用来提交form 而在 1.x 中则呈现为 ﹤input type=button onclick=_doPostBack(...) /﹥ 此普通 button 不具备 submit 的上述默认行为<br/><br/>ASP.NET回车提交事件实现3. 禁用此默认行为有法二<br/><br/>(1)设置 form 元素的 defualtButton 为你希望响应回车的真正按钮如下<br/><br/>&nbsp;&nbsp; 1. ﹤form id=&#34;form1&#34;<br/>&nbsp;&nbsp; 2.<br/>&nbsp;&nbsp; 3. runat=&#34;server&#34;<br/>&nbsp;&nbsp; 4.<br/>&nbsp;&nbsp; 5. defaultbutton=&#34;Button1&#34;﹥ <br/><br/>注意 defaultButton = ﹤ ﹤TargetButton.ID﹥﹥ 因此这对复合控件中比如模板的 Button 可能无效（未测试）<br/><br/>(2)修改 button 呈现方式 UseSubmitBehavior=&#34;false&#34;<br/><br/>&nbsp;&nbsp; 1. ﹤asp:Button ID=&#34;Button1&#34;<br/>&nbsp;&nbsp; 2.<br/>&nbsp;&nbsp; 3. runat=&#34;server&#34; Text=&#34;Button&#34;<br/>&nbsp;&nbsp; 4.<br/>&nbsp;&nbsp; 5. onclick=&#34;Button1_Click&#34;<br/>&nbsp;&nbsp; 6.<br/>&nbsp;&nbsp; 7. UseSubmitBehavior=&#34;false&#34; /﹥ <br/><br/>另外可以通过控制焦点的方式，过滤回车实践，需要记录一笔的是，获取当前页面焦点所在控件的ID：<br/><br/>&nbsp;&nbsp; 1. document.activeElement&nbsp;&nbsp;<br/><br/>对于ASP.NET.我们在TextBox1中输入内容后，按下enter键后，就执行Button1的click方法。那么在page_load事件方法中写。<br/><br/>&nbsp;&nbsp; 1. TextBox1.Attributes.Add(&#34;onkeydown&#34;,<br/>&nbsp;&nbsp; 2.<br/>&nbsp;&nbsp; 3. &#34;if(event.which || event.keyCode){<br/>&nbsp;&nbsp; 4.<br/>&nbsp;&nbsp; 5. if ((event.which == 13) || (event.keyCode == 13)) {<br/>&nbsp;&nbsp; 6.<br/>&nbsp;&nbsp; 7. document.getElementById(&#39;&#34;+<br/>&nbsp;&nbsp; 8.<br/>&nbsp;&nbsp; 9. Button1.UniqueID+&#34;&#39;).click();return false;}}<br/>&nbsp;&nbsp;10.<br/>&nbsp;&nbsp;11. else {return true}; &#34;); <br/><br/>有ASP.NET里面用了form runat=server的表单的时候，里面的﹤asp:button .. 总不能按个回车提交表单，很是不爽。<br/>现在终于发现了一个属性可以干这个事情，用 this.Form.DefaultButton = &#34;ContentPlaceHolder1$btsubmit&#34;;<br/>值得注意的是，如果用了masterPage(母板页)，那么要在按钮ID前加上母板的ID:ContentPlaceHolderID和一个美元符($)<br/><br/>C#实现代码如下：<br/><br/>&nbsp;&nbsp; 1. ﹤%@ Page Language=&#34;C#&#34;<br/>&nbsp;&nbsp; 2. MasterPageFile=&#34;~/MasterPage.master&#34;<br/>&nbsp;&nbsp; 3. AutoEventWireup=&#34;true&#34;<br/>&nbsp;&nbsp; 4. CodeFile=&#34;login.aspx.cs&#34;<br/>&nbsp;&nbsp; 5. Inherits=&#34;login&#34; %﹥<br/>&nbsp;&nbsp; 6. ﹤asp:Content ID=&#34;Content1&#34;<br/>&nbsp;&nbsp; 7. ContentPlaceHolderID=&#34;ContentPlaceHolder1&#34;<br/>&nbsp;&nbsp; 8. Runat=&#34;Server&#34;﹥<br/>&nbsp;&nbsp; 9. ﹤asp:TextBox runat=&#34;server&#34;<br/>&nbsp;&nbsp;10. ID=&#34;wd&#34; ﹥﹤/asp:TextBox﹥<br/>&nbsp;&nbsp;11. ﹤asp:Button ID=&#34;btsubmit&#34;<br/>&nbsp;&nbsp;12. runat=&#34;server&#34; Text=&#34;提交&#34;<br/>&nbsp;&nbsp;13. OnClick=&#34;btsubmit_Click&#34; /﹥<br/>&nbsp;&nbsp;14. ...........................<br/>&nbsp;&nbsp;15. ﹤/asp:Content﹥ <br/><br/>(1)含母板页的类中:<br/><br/>&nbsp;&nbsp; 1. protected void Page_Load(object sender, EventArgs e)<br/>&nbsp;&nbsp; 2. {<br/>&nbsp;&nbsp; 3. this.Form.DefaultButton = &#34;ContentPlaceHolder1$btsubmit&#34;;<br/>&nbsp;&nbsp; 4. } <br/><br/>或者在内容页<br/><br/>&nbsp;&nbsp; 1. protected void Page_Load(object sender, EventArgs e)<br/>&nbsp;&nbsp; 2. {<br/>&nbsp;&nbsp; 3. this.Page.Form.DefaultButton = &#34;ContentPlaceHolder1$btsubmit&#34;;<br/>&nbsp;&nbsp; 4. } <br/><br/>(2)非母板页的类中:<br/><br/>&nbsp;&nbsp; 1. protected void Page_Load(object sender, EventArgs e)<br/>&nbsp;&nbsp; 2. {<br/>&nbsp;&nbsp; 3. this.Form.DefaultButton = &#34;btsubmit&#34;;<br/>&nbsp;&nbsp; 4. } <br/><br/>ASP.NET回车提交事件的具体情况就向你介绍到这里，希望对你了解和学习ASP.NET回车提交事件有所帮助。]]></summary>
	  <link rel="alternate" type="text/html" href="http://www.mdrt.org.cn/article/28.htm" /> 
	  <id>http://www.mdrt.org.cn/default.asp?id=28</id>
  </entry>	
		
</feed>
