演示图,第一步,6位密码中,先输入两个,另4个禁用,点击提交后,再从另外4个位置中选两可填,另四个禁止
提交后,第二个输入框效果
第一个auth.asp内容为
<form class="stdform" action="auth2.asp" method="post">
<%
Dim tt , tt2
tt=Split("0,1,2,3,4,5",",")
'随机排序
randomize
for ii=0 to 5
b=int(rnd()*6)
temp=tt(b)
tt(b)=tt(ii)
tt(ii)=temp
Next
tt2=tt(2)&","&tt(3)&","&tt(4)&","&tt(5)
'response.write tt2
%>
<script type="text/javascript">
$(function(){
//$("#dual<%= tt(2) %>").attr("placeholder","-----");
$("#dual<%= tt(2) %>").attr("title","禁止填写");
$("#dual<%= tt(2) %>").attr("disabled","disabled");
$("#dual<%= tt(2) %>").attr("style","background:#555");
//$("#dual<%= tt(3) %>").attr("placeholder","-----");
$("#dual<%= tt(3) %>").attr("title","禁止填写");
$("#dual<%= tt(3) %>").attr("disabled","disabled");
$("#dual<%= tt(3) %>").attr("style","background:#555");
//$("#dual<%= tt(4) %>").attr("placeholder","-----");
$("#dual<%= tt(4) %>").attr("title","禁止填写");
$("#dual<%= tt(4) %>").attr("disabled","disabled");
$("#dual<%= tt(4) %>").attr("style","background:#555");
//$("#dual<%= tt(5) %>").attr("placeholder","-----");
$("#dual<%= tt(5) %>").attr("title","禁止填写");
$("#dual<%= tt(5) %>").attr("disabled","disabled");
$("#dual<%= tt(5) %>").attr("style","background:#555");
});
</script>
<input name="hiden_var" value="<%= tt2 %>" type="hidden"/>
<label for="catcha">第二登入密码 </label>
<input id="dual0" type="password" name="dualpassword1" size="1" maxlength="1" value="" title="" placeholder="1st"/>
<input id="dual1" type="password" name="dualpassword2" size="1" maxlength="1" value="" placeholder="2nd"/>
<input id="dual2" type="password" name="dualpassword3" size="1" maxlength="1" value="" placeholder="3rd"/>
<input id="dual3" type="password" name="dualpassword4" size="1" maxlength="1" value="" placeholder="4th"/>
<input id="dual4" type="password" name="dualpassword5" size="1" maxlength="1" value="" placeholder="5th"/>
<input id="dual5" type="password" name="dualpassword6" size="1" maxlength="1" value="" placeholder="6th"/>
<input type="submit" name="login" value="提交" />
</form>
第二个auth2.asp内容为
<form class="stdform" action="auth3.asp" method="post">
<%
Dim tt , tt2
tt=Split(Request.Form("hiden_var"),",")
'随机排序
randomize
for ii=0 to 3
b=int(rnd()*4)
temp=tt(b)
tt(b)=tt(ii)
tt(ii)=temp
Next
tt2=tt(2)&","&tt(3)
'response.write tt2
%>
<script type="text/javascript">
$(function(){
//$("#dual<%= tt(2) %>").attr("placeholder","-----");
$("#dual<%= tt(2) %>").attr("title","禁止填写");
$("#dual<%= tt(2) %>").attr("disabled","disabled");
$("#dual<%= tt(2) %>").attr("style","background:#555");
//$("#dual<%= tt(3) %>").attr("placeholder","-----");
$("#dual<%= tt(3) %>").attr("title","禁止填写");
$("#dual<%= tt(3) %>").attr("disabled","disabled");
$("#dual<%= tt(3) %>").attr("style","background:#555");
});
</script>
<input name="hiden_var" value="<%= tt2 %>" type="hidden"/>
<label for="catcha">第二登入密码 </label>
<input id="dual0" type="password" name="dualpassword1" size="1"<% if len(Request.Form("dualpassword1"))>0 Then response.write "style='background:#555'" else response.write "placeholder='1nd' " end If %> maxlength="1" value="<%= Request.Form("dualpassword1") %>" />
<input id="dual1" type="password" name="dualpassword2" size="1" maxlength="1"<% if len(Request.Form("dualpassword2"))>0 Then response.write " style='background:#555'" else response.write "placeholder='2nd'" end If %> value="<%= Request.Form("dualpassword2") %>" />
<input id="dual2" type="password" name="dualpassword3" size="1" maxlength="1" <% if len(Request.Form("dualpassword3"))>0 Then response.write " style='background:#555'" else response.write "placeholder='3nd'" end If %>value="<%= Request.Form("dualpassword3") %>" />
<input id="dual3" type="password" name="dualpassword4" size="1" maxlength="1" <% if len(Request.Form("dualpassword4"))>0 Then response.write " style='background:#555'" else response.write "placeholder='4nd' " end If %>value="<%= Request.Form("dualpassword4") %>"/>
<input id="dual4" type="password" name="dualpassword5" size="1" maxlength="1" <% if len(Request.Form("dualpassword5"))>0 Then response.write "style='background:#555'" else response.write "placeholder='5nd' " end If %>value="<%= Request.Form("dualpassword5") %>" />
<input id="dual5" type="password" name="dualpassword6" size="1" maxlength="1" <% if len(Request.Form("dualpassword6"))>0 Then response.write " style='background:#555'" else response.write "placeholder='6nd'" end If %>value="<%= Request.Form("dualpassword6") %>" />
<input type="submit" name="login" value="提交" />
</form>
第三个文件内容为auth3.asp
<form class="stdform" action="act.asp" method="post">
<label for="catcha">第二登入密码 </label>
<input id="dual0" class="span1" type="password" name="dualpassword1" required="required" size="1"<% if len(Request.Form("dualpassword1"))>0 Then response.write "style='background:#555'" else response.write "placeholder='1nd' " end If %> maxlength="1" value="<%= Request.Form("dualpassword1") %>" />
<input id="dual1" class="span1" type="password" name="dualpassword2" required="required" size="1" maxlength="1"<% if len(Request.Form("dualpassword2"))>0 Then response.write " style='background:#555'" else response.write "placeholder='2nd'" end If %> value="<%= Request.Form("dualpassword2") %>" />
<input id="dual2" class="span1" type="password" name="dualpassword3" required="required" size="1" maxlength="1" <% if len(Request.Form("dualpassword3"))>0 Then response.write " style='background:#555'" else response.write "placeholder='3nd'" end If %>value="<%= Request.Form("dualpassword3") %>" />
<input id="dual3" class="span1" type="password" name="dualpassword4" required="required" size="1" maxlength="1" <% if len(Request.Form("dualpassword4"))>0 Then response.write " style='background:#555'" else response.write "placeholder='4nd' " end If %>value="<%= Request.Form("dualpassword4") %>"/>
<input id="dual4" class="span1" type="password" name="dualpassword5" required="required" size="1" maxlength="1" <% if len(Request.Form("dualpassword5"))>0 Then response.write "style='background:#555'" else response.write "placeholder='5nd' " end If %>value="<%= Request.Form("dualpassword5") %>" />
<input id="dual5" class="span1" type="password" name="dualpassword6" required="required" size="1" maxlength="1" <% if len(Request.Form("dualpassword6"))>0 Then response.write " style='background:#555'" else response.write "placeholder='6nd'" end If %>value="<%= Request.Form("dualpassword6") %>" />
<input type="submit" name="login" value="提交" />
</form>