<div onkeydown="javascript:if(event.keyCode==13) search()">

<br >

ISBN<span style="color:red">*</span>:<input name="Text1" type="text" id="searchbox" value="-" >
书名<span style="color:red">*</span>:<input name="Text1" type="text" id="searchbox2" value="">
年:<select name="Select1" id="Select1">
<option></option>
<option></option>
<option></option>
<option></option>
<option>-------</option>
<option></option>
<option></option>
<option></option>
</select>
季:<select name="Select2" id="Select2" style="width: 96px">
<option>春季</option>
<option>秋季</option> </select>
<input name="button1" type="submit" value="提交" id="searchbtn" onclick="search()"> <script type="text/jscript">
//js获取地址栏参数
function getQueryString(name)
{
var reg=new RegExp("(^|&)" + name + "=([^&]*)(&|$)","i");
var r=window.location.search.substr().match(reg);
if(r!=null)
return unescape(r[]);return null;
}
// 调用方法
//alert(GetQueryString("参数名1"));
//alert(GetQueryString("参数名2"));
//alert(GetQueryString("参数名3")); //查找函数
function search()
{
//alert("ok");
var k=document.getElementById("searchbox").value;
k=escape(k);
if(k==null)
document.getElementById("serchbox").value="-"; var k2=document.getElementById("searchbox2").value; if(typeof(k2)=="undefined" || k2==null || k2.length<) //string 类型 内容为空
{
alert("请输入书名!");
document.getElementById("searchbox2").focus();
return;
}
k2=escape(k2); //if(typeOf(k2)=="undefined")
//document.getElementById("searchbox2").value="图"; var drop = document.getElementById("Select1");
var k3=drop.options[drop.selectedIndex].value;
//获取select的值
k3=escape(k3); var drop2 = document.getElementById("Select2");
var k4=drop2.options[drop2.selectedIndex].value;
//获取select的值
k4=escape(k4); window.location.href="http://point/jcfs/SitePages/xtjh.aspx?k="+k+"&k2="+k2+"&k3="+k3+"&k4="+k4; }
//传递参数刷新界面后保留之前输入的控件框中的内容 首次加载时 k k2均为空
//escape 对字符串进行编码 unescape 对字符串进行解码
document.getElementById("searchbox").value=unescape(getQueryString("k"));
document.getElementById("searchbox2").value=unescape(getQueryString("k2"));
//if(k2=="_") document.getElementById("searchbox2").value="";
var drop = document.getElementById("Select1");
for(i=;i<drop.length;i++)
{//给select赋值
if(unescape(getQueryString("k3"))==drop.options[i].value)
{
drop.options[i].selected=true
}
}
var drop2 = document.getElementById("Select2");
for(i=;i<drop2.length;i++)
{//给select赋值
if(unescape(getQueryString("k4"))==drop2.options[i].value)
{
drop2.options[i].selected=true
}
}//end </script>
<br >
</div>

xtjh的更多相关文章

  1. 51. N-Queens

    题目: The n-queens puzzle is the problem of placing n queens on an n×n chessboard such that no two que ...

  2. aop测试jdk代理机制

    //测试jdk代理机制 @Test public void testProxy(){ final UsbDisk usbDisk = new UsbDisk(); //类加载器,接口,匿名内部类 // ...

  3. openstack grizzly版network网络节点安装

    版本以及源的配置和控制节点一致 1.安装完操作系统已经apt源配置完成之后,一定要执行 apt-get update root@cloud:~# mv /etc/apt/sources.list /e ...

随机推荐

  1. iOS 在一个应用程序中调另一个应用程序

    在A应用程序中调用B应用程序 1. 首先在B应用程序中生成URL 1)点击targets文件 2)点击Info 3)生成URL ①在Info.plist文件中点击+(新添加一项) ②在Info.pli ...

  2. play项目部署

    首先对于现场的数据库,一定要谨慎谨慎再谨慎,特别是保存有重要数据的. 使用expdp命令导入数据库: 事前准备: 1.确保linux服务器上已经正确安装oracle (10g以上版本) 2.有Xshe ...

  3. memwatch内存泄露检测工具

    工具介绍 官网 http://www.linkdata.se/sourcecode/memwatch/ 其功能如下官网介绍,挑选重点整理: 1. 号称功能: 内存泄露检测 (检测未释放内存, 即 动态 ...

  4. 一个小玩意 PHP实现微信红包金额拆分试玩

    <meta charset="utf-8"> <?php // 新年红包金额拆分试玩 class CBonus { public $bonus;//红包 publ ...

  5. PostgreSQL Replication之第十二章 与Postgres-XC一起工作(4)

    12.4 性能优化 Postgres-XC不是一个奇特的PostgreSQL版本,而是一个真正的分布式系统.这意味这,您不能只存储数据,希望事情超出服务器之外的快速,高效.如果您想优化速度,思考数据是 ...

  6. 资源Createwindow,对应标识符,绑定窗口

    问? 定义一个CEdit cedit1:怎么和IDC_EDIT1 关联,可以在CEdit.Create()里传进去或者在DoDataExchange()里面绑定,是不是一定要先弄出个IDC_EDIT1 ...

  7. 双端队列(单调队列)poj2823 区间最小值(RMQ也可以)

    Sliding Window Time Limit: 12000MS   Memory Limit: 65536K Total Submissions: 41844   Accepted: 12384 ...

  8. oracle 新手遇到常见问题的解决办法

    可能照成以下问题的原因也许有很多种,但是就小白而言,我只记录自己学习过程中遇到的所有的问题.希望对一些新手 小白们有所帮助. 原因是 sys 不是sysdba 用户,你要将其作为sysdba 用户登录 ...

  9. android中影藏状态栏和标题栏的几种方法

    1,在android中,有时候我们想隐藏我们的状态栏和标题栏(如:第一次安装app时候的欢迎界面),实现这些效果有几种方法,随便选取自己喜欢的即可. 2, A:利用代码实现,在我们主Activity中 ...

  10. 01---Net基础加强

    声明两个变量:int n1 = 10, n2 = 20;要求将两个变量交换,最后输出n1为20,n2为10.交换两个变量,使用第三个变量! class Program { static void Ma ...