日期:2014-05-16 浏览次数:20502 次
<div>
<asp:TextBox ID="txtbox" runat="server" reg="\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" tip="出错了哈哈哈"></asp:TextBox>
<uc1:DeptEmpDropDownList ID="DeptEmpDropDownList1" runat="server" />
<br />
<asp:TextBox ID="pwdtexbox" reg="([0-9]+)" tip="pwdtextbox" runat="server"></asp:TextBox>
<br />
<asp:Button ID="yesButton" runat="server" Text="确定" onclick="yesButton_Click" />
</div>
<script type="text/javascript" src="../js/jquery-1.6.2.min.js"></script>
<script type="text/javascript" >
function clickevt(e) {
e = e || window.event;
obj = e.srcElement;
$(document).ready(
function () {
$("#" + obj.id).focus(
function () {
$("#" + obj.id).css("background-color", "#FFFFCC");
});
$("#" + obj.id).blur(
function () {
//$("#"+obj.id).css("background-color", "#D6D6FF");
var control = document.getElementById(obj.id);
if (control.getAttribute("reg") != null) {
var pattern = control.getAttribute("reg");
var textdata = control.value;
var tip = control.getAttribute("tip");
&nb