1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
2 <!-- saved from url=(0044)http://localhost:5667/WebSite1/Default4.aspx -->
3 <HTML xmlns="http://www.w3.org/1999/xhtml"><HEAD><TITLE>无标题页</TITLE>
4 <META http-equiv=Content-Type content="text/html; charset=utf-8">
5 <SCRIPT src="无标题页_files/jquery.js" type=text/javascript></SCRIPT>
6
7 <SCRIPT language=javascript type=text/javascript>
8 var IsFirst_click=0;
9 $(document).ready(function(){
10 $(this).bind("click",function(){
11 IsFirst_click++;
12 if($("#tip").is(":visible")){if(IsFirst_click>2){$("#tip").hide();}}
13 })
14 $("input[name=txtnum]").each(function(i,n){$(n).addClass("txt")})
15 })
16 function changeNum(obj){
17 var message="<font color=blue>修改成功!</font><br>您的商品总金额为:<font color=blue>¥3898.20元</font>",iserror=false;
18 $("#loading").fadeIn(1000);
19 IsFirst_click=0;
20
21 if($("#tip").is(":visible"))
22 {
23 $("#tip").hide()
24 }
25
26 if(!isNumber($.trim($(obj).val())) || parseInt($.trim($(obj).val()))<=0)
27 {
28 //alert('数量必须为大于0的正整数')
29 iserror=true;
30 message="数量必须为大于0的正整数\r\n";
31 $(obj).val(1);
32 $(obj).focus();
33 }
34 else
35 {
36 var lastNum=$(obj).parent().children("span").text();
37 var CurrentNum=parseInt($.trim($(obj).val()));
38 if(CurrentNum>lastNum)
39 {
40 $(obj).val(lastNum);
41 iserror=true;
42 message="库存不足!库存数量:"+lastNum+";";
43 }
44 }
45 $("#loading").fadeOut(1000);
46 TipMsg(obj,message);
47 }
48
49 function TipMsg(obj,message)
50 {
51 var top=$(obj).offset().top-$("#tip").height()+5;
52 var left=$(obj).offset().left-($("#tip").width()/2)+5;
53
54 $("#tip").css({left:left+"px",top:top+"px"})
55 $("#tip").toggle();
56 $("#tip .top_tip").html(message);
57
58 var $Close=$("<span style='text-align:center; display:block; cursor:pointer; color:blue; text-decoration:underline' onclick=\"closeDiv();\">关 闭</span>");
59 $Close.appendTo($("#tip .top_tip"));
60 }
61
62
63 function closeDiv(){
64 if($("#tip")){
65 $("#tip").hide();
66 }
67 }
68
69 function isNumber(str){
70 if(""==str){
71 return false;
72 }
73 var reg = /\D/;
74 return str.match(reg)==null;
75 }
76
77 </SCRIPT>
78
79 <STYLE type=text/css>.txt {
80 BORDER-RIGHT: #ccc 1px solid; BORDER-TOP: #ccc 1px solid; BORDER-LEFT: #ccc 1px solid; WIDTH: 30px; BORDER-BOTTOM: #ccc 1px solid
81 }
82 #tip1 {
83 BORDER-RIGHT: #797979 1px solid; PADDING-RIGHT: 10px; BORDER-TOP: #797979 1px solid; DISPLAY: none; PADDING-LEFT: 10px; FONT-SIZE: 13px; BACKGROUND: url(p_window_204x6.gif) #fff5d2 no-repeat left bottom; PADDING-BOTTOM: 10px; BORDER-LEFT: #797979 1px solid; WIDTH: 184px; LINE-HEIGHT: 23px; PADDING-TOP: 10px; BORDER-BOTTOM: #797979 1px solid; POSITION: absolute; HEIGHT: 60px
84 }
85 #tip {
86 DISPLAY: none; FONT-SIZE: 12px; FILTER: progid:DXImageTransform.Microsoft.Alpha(opacity=95); WIDTH: 204px; POSITION: absolute; HEIGHT: 78px
87 }
88 #tip .top_tip {
89 BORDER-RIGHT: #797979 1px solid; PADDING-RIGHT: 8px; BORDER-TOP: #797979 1px solid; PADDING-LEFT: 10px; PADDING-BOTTOM: 0px; BORDER-LEFT: #797979 1px solid; WIDTH: 184px; COLOR: red; LINE-HEIGHT: 20px; PADDING-TOP: 10px; BORDER-BOTTOM: #797979 0px solid; HEIGHT: 58px; BACKGROUND-COLOR: #fff6ce
90 }
91 #tip .bot_tip {
92 BACKGROUND: url(p_window_204x6.gif) no-repeat; WIDTH: 204px; HEIGHT: 6px
93 }
94 #loading {
95 BORDER-RIGHT: skyblue 1px solid; PADDING-RIGHT: 10px; BORDER-TOP: skyblue 1px solid; DISPLAY: none; PADDING-LEFT: 10px; FONT-SIZE: 12px; RIGHT: 0px; BACKGROUND: #fff5d2; FILTER: progid:DXImageTransform.Microsoft.Alpha(opacity=95); PADDING-BOTTOM: 10px; BORDER-LEFT: skyblue 1px solid; WIDTH: 110px; LINE-HEIGHT: 20px; PADDING-TOP: 10px; BORDER-BOTTOM: skyblue 1px solid; POSITION: absolute; TOP: 0px; HEIGHT: 20px
96 }
97 </STYLE>
98
99 <META content="MSHTML 6.00.3790.1830" name=GENERATOR></HEAD>
100 <BODY>
101 <FORM id=form1 style="PADDING-LEFT: 200px" name=form1 action=Default4.aspx
102 method=post>
103 <DIV><INPUT id=__VIEWSTATE type=hidden
104 value=/wEPDwUJMzg2NDQ0Njg2D2QWAgIDD2QWAgIBDzwrAA0BAA8WBh4LXyFEYXRhQm91bmRnHglQYWdlQ291bnQCAR4LXyFJdGVtQ291bnQCBmQWAmYPZBYOAgEPZBYIZg9kFgJmDxUBAjEyZAIBD2QWAmYPFQEFbGlrZTBkAgIPZBYCZg8VAQEwZAIDD2QWAmYPFQIBMAEwZAICD2QWCGYPZBYCZg8VAQIxM2QCAQ9kFgJmDxUBBWxpa2UxZAICD2QWAmYPFQEEMTIuMmQCAw9kFgJmDxUCATUBMmQCAw9kFghmD2QWAmYPFQECMTRkAgEPZBYCZg8VAQVsaWtlMmQCAg9kFgJmDxUBBDI0LjRkAgMPZBYCZg8VAgIxMAE0ZAIED2QWCGYPZBYCZg8VAQIxNWQCAQ9kFgJmDxUBBWxpa2UzZAICD2QWAmYPFQEEMzYuNmQCAw9kFgJmDxUCAjE1ATZkAgUPZBYIZg9kFgJmDxUBAjE2ZAIBD2QWAmYPFQEFbGlrZTRkAgIPZBYCZg8VAQQ0OC44ZAIDD2QWAmYPFQICMjABOGQCBg9kFghmD2QWAmYPFQECMTdkAgEPZBYCZg8VAQVsaWtlNWQCAg9kFgJmDxUBAjYxZAIDD2QWAmYPFQICMjUCMTBkAgcPDxYCHgdWaXNpYmxlaGRkGAEFCUdyaWRWaWV3MQ9nZFmT9dYmwtOEJDa0fuqNX+6WvRk9
105 name=__VIEWSTATE> </DIV>
106 <DIV><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR>
107 <DIV id=tip1><SPAN></SPAN></DIV>
108 <DIV id=loading><IMG alt=""
109 src="无标题页_files/loading.gif"> 数据修改中....</DIV><BR><BR>
110 <DIV>
111 <TABLE id=GridView1 style="BORDER-COLLAPSE: collapse" cellSpacing=0 rules=all
112 border=1>
113 <TBODY>
114 <TR>
115 <TH scope=col>编号</TH>
116 <TH scope=col>Name</TH>
117 <TH scope=col>Price</TH>
118 <TH scope=col>Num</TH></TR>
119 <TR style="HEIGHT: 60px" align=middle>
120 <TD>12 </TD>
121 <TD>like0 </TD>
122 <TD>0 </TD>
123 <TD><INPUT
124 onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))"
125 lang=123 maxLength=3 onchange=changeNum(this) size=3 value=0 name=txtnum>
126 <SPAN>0</SPAN> </TD></TR>
127 <TR style="HEIGHT: 60px" align=middle>
128 <TD>13 </TD>
129 <TD>like1 </TD>
130 <TD>12.2 </TD>
131 <TD><INPUT
132 onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))"
133 lang=123 maxLength=3 onchange=changeNum(this) size=3 value=5 name=txtnum>
134 <SPAN>2</SPAN> </TD></TR>
135 <TR style="HEIGHT: 60px" align=middle>
136 <TD>14 </TD>
137 <TD>like2 </TD>
138 <TD>24.4 </TD>
139 <TD><INPUT
140 onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))"
141 lang=123 maxLength=3 onchange=changeNum(this) size=3 value=10 name=txtnum>
142 <SPAN>4</SPAN> </TD></TR>
143 <TR style="HEIGHT: 60px" align=middle>
144 <TD>15 </TD>
145 <TD>like3 </TD>
146 <TD>36.6 </TD>
147 <TD><INPUT
148 onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))"
149 lang=123 maxLength=3 onchange=changeNum(this) size=3 value=15 name=txtnum>
150 <SPAN>6</SPAN> </TD></TR>
151 <TR style="HEIGHT: 60px" align=middle>
152 <TD>16 </TD>
153 <TD>like4 </TD>
154 <TD>48.8 </TD>
155 <TD><INPUT
156 onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))"
157 lang=123 maxLength=3 onchange=changeNum(this) size=3 value=20 name=txtnum>
158 <SPAN>8</SPAN> </TD></TR>
159 <TR style="HEIGHT: 60px" align=middle>
160 <TD>17 </TD>
161 <TD>like5 </TD>
162 <TD>61 </TD>
163 <TD><INPUT
164 onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))"
165 lang=123 maxLength=3 onchange=changeNum(this) size=3 value=25 name=txtnum>
166 <SPAN>10</SPAN> </TD></TR></TBODY></TABLE></DIV>
167 <DIV id=tip>
168 <DIV class=top_tip></DIV>
169 <DIV class=bot_tip></DIV></DIV></DIV></FORM></BODY></HTML>
170
2 <!-- saved from url=(0044)http://localhost:5667/WebSite1/Default4.aspx -->
3 <HTML xmlns="http://www.w3.org/1999/xhtml"><HEAD><TITLE>无标题页</TITLE>
4 <META http-equiv=Content-Type content="text/html; charset=utf-8">
5 <SCRIPT src="无标题页_files/jquery.js" type=text/javascript></SCRIPT>
6
7 <SCRIPT language=javascript type=text/javascript>
8 var IsFirst_click=0;
9 $(document).ready(function(){
10 $(this).bind("click",function(){
11 IsFirst_click++;
12 if($("#tip").is(":visible")){if(IsFirst_click>2){$("#tip").hide();}}
13 })
14 $("input[name=txtnum]").each(function(i,n){$(n).addClass("txt")})
15 })
16 function changeNum(obj){
17 var message="<font color=blue>修改成功!</font><br>您的商品总金额为:<font color=blue>¥3898.20元</font>",iserror=false;
18 $("#loading").fadeIn(1000);
19 IsFirst_click=0;
20
21 if($("#tip").is(":visible"))
22 {
23 $("#tip").hide()
24 }
25
26 if(!isNumber($.trim($(obj).val())) || parseInt($.trim($(obj).val()))<=0)
27 {
28 //alert('数量必须为大于0的正整数')
29 iserror=true;
30 message="数量必须为大于0的正整数\r\n";
31 $(obj).val(1);
32 $(obj).focus();
33 }
34 else
35 {
36 var lastNum=$(obj).parent().children("span").text();
37 var CurrentNum=parseInt($.trim($(obj).val()));
38 if(CurrentNum>lastNum)
39 {
40 $(obj).val(lastNum);
41 iserror=true;
42 message="库存不足!库存数量:"+lastNum+";";
43 }
44 }
45 $("#loading").fadeOut(1000);
46 TipMsg(obj,message);
47 }
48
49 function TipMsg(obj,message)
50 {
51 var top=$(obj).offset().top-$("#tip").height()+5;
52 var left=$(obj).offset().left-($("#tip").width()/2)+5;
53
54 $("#tip").css({left:left+"px",top:top+"px"})
55 $("#tip").toggle();
56 $("#tip .top_tip").html(message);
57
58 var $Close=$("<span style='text-align:center; display:block; cursor:pointer; color:blue; text-decoration:underline' onclick=\"closeDiv();\">关 闭</span>");
59 $Close.appendTo($("#tip .top_tip"));
60 }
61
62
63 function closeDiv(){
64 if($("#tip")){
65 $("#tip").hide();
66 }
67 }
68
69 function isNumber(str){
70 if(""==str){
71 return false;
72 }
73 var reg = /\D/;
74 return str.match(reg)==null;
75 }
76
77 </SCRIPT>
78
79 <STYLE type=text/css>.txt {
80 BORDER-RIGHT: #ccc 1px solid; BORDER-TOP: #ccc 1px solid; BORDER-LEFT: #ccc 1px solid; WIDTH: 30px; BORDER-BOTTOM: #ccc 1px solid
81 }
82 #tip1 {
83 BORDER-RIGHT: #797979 1px solid; PADDING-RIGHT: 10px; BORDER-TOP: #797979 1px solid; DISPLAY: none; PADDING-LEFT: 10px; FONT-SIZE: 13px; BACKGROUND: url(p_window_204x6.gif) #fff5d2 no-repeat left bottom; PADDING-BOTTOM: 10px; BORDER-LEFT: #797979 1px solid; WIDTH: 184px; LINE-HEIGHT: 23px; PADDING-TOP: 10px; BORDER-BOTTOM: #797979 1px solid; POSITION: absolute; HEIGHT: 60px
84 }
85 #tip {
86 DISPLAY: none; FONT-SIZE: 12px; FILTER: progid:DXImageTransform.Microsoft.Alpha(opacity=95); WIDTH: 204px; POSITION: absolute; HEIGHT: 78px
87 }
88 #tip .top_tip {
89 BORDER-RIGHT: #797979 1px solid; PADDING-RIGHT: 8px; BORDER-TOP: #797979 1px solid; PADDING-LEFT: 10px; PADDING-BOTTOM: 0px; BORDER-LEFT: #797979 1px solid; WIDTH: 184px; COLOR: red; LINE-HEIGHT: 20px; PADDING-TOP: 10px; BORDER-BOTTOM: #797979 0px solid; HEIGHT: 58px; BACKGROUND-COLOR: #fff6ce
90 }
91 #tip .bot_tip {
92 BACKGROUND: url(p_window_204x6.gif) no-repeat; WIDTH: 204px; HEIGHT: 6px
93 }
94 #loading {
95 BORDER-RIGHT: skyblue 1px solid; PADDING-RIGHT: 10px; BORDER-TOP: skyblue 1px solid; DISPLAY: none; PADDING-LEFT: 10px; FONT-SIZE: 12px; RIGHT: 0px; BACKGROUND: #fff5d2; FILTER: progid:DXImageTransform.Microsoft.Alpha(opacity=95); PADDING-BOTTOM: 10px; BORDER-LEFT: skyblue 1px solid; WIDTH: 110px; LINE-HEIGHT: 20px; PADDING-TOP: 10px; BORDER-BOTTOM: skyblue 1px solid; POSITION: absolute; TOP: 0px; HEIGHT: 20px
96 }
97 </STYLE>
98
99 <META content="MSHTML 6.00.3790.1830" name=GENERATOR></HEAD>
100 <BODY>
101 <FORM id=form1 style="PADDING-LEFT: 200px" name=form1 action=Default4.aspx
102 method=post>
103 <DIV><INPUT id=__VIEWSTATE type=hidden
104 value=/wEPDwUJMzg2NDQ0Njg2D2QWAgIDD2QWAgIBDzwrAA0BAA8WBh4LXyFEYXRhQm91bmRnHglQYWdlQ291bnQCAR4LXyFJdGVtQ291bnQCBmQWAmYPZBYOAgEPZBYIZg9kFgJmDxUBAjEyZAIBD2QWAmYPFQEFbGlrZTBkAgIPZBYCZg8VAQEwZAIDD2QWAmYPFQIBMAEwZAICD2QWCGYPZBYCZg8VAQIxM2QCAQ9kFgJmDxUBBWxpa2UxZAICD2QWAmYPFQEEMTIuMmQCAw9kFgJmDxUCATUBMmQCAw9kFghmD2QWAmYPFQECMTRkAgEPZBYCZg8VAQVsaWtlMmQCAg9kFgJmDxUBBDI0LjRkAgMPZBYCZg8VAgIxMAE0ZAIED2QWCGYPZBYCZg8VAQIxNWQCAQ9kFgJmDxUBBWxpa2UzZAICD2QWAmYPFQEEMzYuNmQCAw9kFgJmDxUCAjE1ATZkAgUPZBYIZg9kFgJmDxUBAjE2ZAIBD2QWAmYPFQEFbGlrZTRkAgIPZBYCZg8VAQQ0OC44ZAIDD2QWAmYPFQICMjABOGQCBg9kFghmD2QWAmYPFQECMTdkAgEPZBYCZg8VAQVsaWtlNWQCAg9kFgJmDxUBAjYxZAIDD2QWAmYPFQICMjUCMTBkAgcPDxYCHgdWaXNpYmxlaGRkGAEFCUdyaWRWaWV3MQ9nZFmT9dYmwtOEJDa0fuqNX+6WvRk9
105 name=__VIEWSTATE> </DIV>
106 <DIV><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR>
107 <DIV id=tip1><SPAN></SPAN></DIV>
108 <DIV id=loading><IMG alt=""
109 src="无标题页_files/loading.gif"> 数据修改中....</DIV><BR><BR>
110 <DIV>
111 <TABLE id=GridView1 style="BORDER-COLLAPSE: collapse" cellSpacing=0 rules=all
112 border=1>
113 <TBODY>
114 <TR>
115 <TH scope=col>编号</TH>
116 <TH scope=col>Name</TH>
117 <TH scope=col>Price</TH>
118 <TH scope=col>Num</TH></TR>
119 <TR style="HEIGHT: 60px" align=middle>
120 <TD>12 </TD>
121 <TD>like0 </TD>
122 <TD>0 </TD>
123 <TD><INPUT
124 onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))"
125 lang=123 maxLength=3 onchange=changeNum(this) size=3 value=0 name=txtnum>
126 <SPAN>0</SPAN> </TD></TR>
127 <TR style="HEIGHT: 60px" align=middle>
128 <TD>13 </TD>
129 <TD>like1 </TD>
130 <TD>12.2 </TD>
131 <TD><INPUT
132 onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))"
133 lang=123 maxLength=3 onchange=changeNum(this) size=3 value=5 name=txtnum>
134 <SPAN>2</SPAN> </TD></TR>
135 <TR style="HEIGHT: 60px" align=middle>
136 <TD>14 </TD>
137 <TD>like2 </TD>
138 <TD>24.4 </TD>
139 <TD><INPUT
140 onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))"
141 lang=123 maxLength=3 onchange=changeNum(this) size=3 value=10 name=txtnum>
142 <SPAN>4</SPAN> </TD></TR>
143 <TR style="HEIGHT: 60px" align=middle>
144 <TD>15 </TD>
145 <TD>like3 </TD>
146 <TD>36.6 </TD>
147 <TD><INPUT
148 onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))"
149 lang=123 maxLength=3 onchange=changeNum(this) size=3 value=15 name=txtnum>
150 <SPAN>6</SPAN> </TD></TR>
151 <TR style="HEIGHT: 60px" align=middle>
152 <TD>16 </TD>
153 <TD>like4 </TD>
154 <TD>48.8 </TD>
155 <TD><INPUT
156 onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))"
157 lang=123 maxLength=3 onchange=changeNum(this) size=3 value=20 name=txtnum>
158 <SPAN>8</SPAN> </TD></TR>
159 <TR style="HEIGHT: 60px" align=middle>
160 <TD>17 </TD>
161 <TD>like5 </TD>
162 <TD>61 </TD>
163 <TD><INPUT
164 onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))"
165 lang=123 maxLength=3 onchange=changeNum(this) size=3 value=25 name=txtnum>
166 <SPAN>10</SPAN> </TD></TR></TBODY></TABLE></DIV>
167 <DIV id=tip>
168 <DIV class=top_tip></DIV>
169 <DIV class=bot_tip></DIV></DIV></DIV></FORM></BODY></HTML>
170
Js,Firmly put your fade