[已解决]这个表单如何提交?
本帖最后由 zhaicheng 于 2011-2-23 10:39 编辑http://hgsyzx.upc.edu.cn/zhai/book.do.htm
谢谢大家!
试了image click 不管用. 用_IENavigate 应该管用吧? _IENavigate 可以 这是完整的源码
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<html>
<head>
<META NAME="save" CONTENT="history"/>
<title>参考咨询</title>
<style type="text/css">
.saveCach{
behavior:url(#default#savehistory);
}
</style>
<link href="/templete1/style/css.css" type="text/css" rel="stylesheet"></link>
<script type="text/JavaScript">
function renovate(){
var a = Math.random();//如果不使用随机数就不会刷新验证码
document.getElementById("authcode").src = "/vImage.jsp?a="+a;
}
function send(){
var uppages="";
var totalpage=212;
var maxpage=43;
var frompage=document.getElementById("frompage");
var endpage=document.getElementById("endpage");
var email=document.getElementById("email");
var verifycode=document.getElementById("verifycode");
if(email.value.length==0){
alert("请输入邮箱!");
return false;
}
if(!(/^\w+((-\w+)|(\.\w+))*\@+((\.|-)+)*\.+$/).test(email.value)){
alert('Email地址格式不正确!');
return false;
}
if(email.value.length>50){
alert("邮箱长度过长,请输入正确的邮箱!");
return false;
}
if (verifycode.value.length != 5){
alert("请准确输入五位数验证码!");
return false;
}
if(isNaN(frompage.value)){
alert("页号必须是数字!");
return false;
}
if(isNaN(endpage.value)){
alert("页号必须是数字!");
return false;
}
if(frompage.value==0){
alert("页号不能为空或零!");
return false;
}
if(endpage.value==0){
alert("页号不能为空或零!");
return false;
}
if(endpage.value-frompage.value+1>maxpage){
alert("对不起,你的咨询超出了单次"+maxpage+"的范围!");
return false;
}
if(endpage.value-frompage.value<0){
alert("右侧页号必须大于等于左侧页号!");
return false;
}
if(frompage.value>totalpage){
alert("输入有误,本书一共"+totalpage+"页!");
return false;
}
if(endpage.value>totalpage){
alert("输入有误,本书一共"+totalpage+"页!");
return false;
}
if(endpage.value==frompage.value){
uppages=endpage.value;
}else{
uppages=frompage.value+"-"+endpage.value;
}
var up=document.getElementById("uppages");
up.value=uppages;
if(up.value.length==0){
alert("提交图书咨询必须填写页号,请阅读服务说明!");
return false;
}
var tips = '';
if(confirm(tips+"您填写的邮箱地址为"+email.value+",是否确认无误并提交?")){
return true;
}
return false;
}
//Response.Buffer = true;
//Response.ExpiresAbsolute = DateTime.Now.AddDays(-1);
//Response.Cache.SetExpires(DateTime.Now.AddDays(-1));
//Response.Expires = 0;
//Response.CacheControl = "no-cache";
//Response.Cache.SetNoStore();
function checkEmail(e){
if(e.value == 1){
document.getElementById("email").value = "";
}else{
document.getElementById("email").value = "";
}
}
</script>
</head>
<body>
<div id="wrap">
<div id="head">
<img src="/templete1/images/head.jpg" />
<div class="txt">陕西地区文献资源共享与服务平台</div>
<div class="nav">
<ul>
<li id="li1" class="current"><a href="/zxform.do" />咨询表单</li>
<li id="li2" class=""><a href="/myzx.do" onclick="changeColor('li2');">我的咨询</a></li>
<li id="li3" class=""><a href="/help.do" onclick="changeColor('li3');" target = "_blank">使用帮助</a></li>
<li class="ext">陕西地区文献资源共享与服务平台</li>
</ul>
</div>
</div>
<div id="content">
<div class="tip">提示:参考咨询服务通过读者填写咨询申请表,咨询馆员将及时准确地把读者所咨询的文献资料或问题答案发送到读者的Email信箱</div>
<form class="zxform" method="post" action="booksubmit.do" onsubmit="return send();">
<div class="title">* 请读者仔细的填写以下咨询申请表单</div>
<ul>
<li>
<span class="label">咨询标题:</span>
<p>灭绝 进化与人类的终结 evolution and the end of human <span class="warning">*</span></p>
<input name="fbf.bookname" value="灭绝 进化与人类的终结 evolution and the end of human" type="hidden"/>
</li>
<li>
<span class="label">咨询类型:</span>
<p>图书</p>
<input name="fbf.type" value="0" type="hidden"/>
</li>
<li>
<span class="label">咨询范围:</span>
<p class="warning">(提示:本书共有正文页212)</p>
<p>正文页<input class="saveCach" id="frompage" type="text" style="width:30px" value="1"/> 页至 <input type="text" class="saveCach" id="endpage" style="width:30px" value="43"/> 页<span class="warning">*</span> </p>
<input name="fbf.uppages" id="uppages" value="" type="hidden"/>
<p class="warning"><label><input class="saveCach" name = "fbf.mulutag" value = "1" type="checkbox"/>如需辅助页(版权页、前言页、目录页、附录页、插页),请勾选</label></p>
</li>
<li>
<span class="label">电子邮箱:</span>
<p><input class="saveCach" type="text" value="" id="email" name="fbf.email" /></p>
<p class="warning">(特别提示:请填写有效的email邮箱地址,如填写有误,您将无法查收到所申请的内容!)</p><br />
</li>
<span class="label">验证码:</span>
<p><input id="verifycode" name="fbf.verifycode "type="text" value="" style="width:50px;"/> <img style="vertical-align:top;" src="/vImage.jsp" id="authcode"/>看不清楚?<a href="javaScript:renovate();">换一张</a></p>
</li>
<li class="submit">
<p><input type="image" src="/templete1/images/btn_submit.jpg"/></p>
</li>
</ul>
<input name = "fbf.username" value = '46W5B5NNHA' type = "hidden"/>
<input name = "fbf.d" value = 'C8B1F42559C16BADB64BCEEC4F731369' type = "hidden"/>
<input name = "fbf.islogin" value = '1' type = "hidden"/>
<input name = "fbf.sp" value = '' type = "hidden"/>
<input name = "fbf.ssuid" value = '123' type = "hidden"/>
<input name = "fbf.detailurl" value = '/bookDetail.jsp?dxNumber=000003111119&d=141CEC192330752081E01B12286F4E4B' type = "hidden"/>
<input name = "fbf.unitid" value = '63' type = "hidden"/>
<input name = "fbf.dxid" value = '000003111119' type = "hidden"/>
<input name = "fbf.author" value = '(美) 迈克尔·博尔特著;张文杰,邓可译' type = "hidden"/>
<input name = "fbf.ssnumber" value = '11133399' type = "hidden"/>
<input name = "fbf.isbn" value = '7-80073-916-3' type = "hidden"/>
<input name = "fbf.publisher" value = '北京市:中信出版社' type = "hidden"/>
<input name = "fbf.publishdate" value = '2003' type = "hidden"/>
<input name = "fbf.spage" value = '' type = "hidden"/>
<input name = "fbf.ipadkey" value = 'B6ACC90AC35C9C8F7A9BDF3AB8DFFEB2' type = "hidden"/>
<input name = "fbf.ipaduserid" value = '' type = "hidden"/>
<input name = "fbf.ipadtype" value = '' type = "hidden"/>
</form>
<div class="intro">
<strong>服务说明:</strong>
<ul>
<li>1、每本图书单次咨询不超过50页,同一图书每周的咨询量不超过全书的20%。 </li>
<li>2、所有咨询内容有效期为20天。</li>
<li>3、回复邮件可能会被当作未知邮件或垃圾邮件,若您没有收到回信,请查看一下不明文件夹或垃圾邮件箱。 </li>
</ul>
</div>
<div class="bottom"></div>
</div>
<div id="foot">©2011图书馆参考咨询服务</div>
</div>
<div style="display:none">
<script src="http://s11.cnzz.com/stat.php?id=2088844&web_id=2088844&show=pic" language="JavaScript"></script>
</div>
</body>
</html> 敬请楼主奉献源码并注释。正在学习 敬请楼主奉献源码并注释。想学习一下!
页:
[1]