<script language=javascript>
function shai() //筛选{var SS=document.getElementById("select").value;
var S_local=document.getElementById("select_local").value;
var S=document.getElementById("S").value;
//document.getElementById("ok").value="/e/action/ListInfo.php?classid=4&ph=1&"+SS+"="+encodeURI(S)+"&local="+encodeURI(S_local);
window.location="/e/action/ListInfo.php?classid=4&ph=1&"+SS+"="+encodeURI(S)+"&local="+encodeURI(S_local);}
</script><select id="select_local" style="position:relative;left:-2px;top:2px;height:24px;font-weight:bold;">
<option value="">地区</option>
<option value="国内">国内</option>
<option value="境外">境外</option>
</select>
<select id="select" style="position:relative;left:-2px;top:2px;height:24px;font-weight:bold;">
<option value="ids">序号</option>
<option value="status">状态</option>
</select>
<input type="text" id="S" style="font-weight:bold;width:100px;height:20px;border: 1px solid #999999;"/>
<a href="#" onClick="shai()"/><b>提交</b></a>
<a href="/e/action/ListInfo.php?classid=4"/><b>全部</b></a>我想要实现比如筛选 【国内】-【状态】-“正常”的数据,点击提交,就访问
/e/action/ListInfo.php?classid=4&ph=1&status=正常&local=国内但问题是第一次点击了好使,打开访问页面后,再筛就不好使了。
function shai() //筛选{var SS=document.getElementById("select").value;
var S_local=document.getElementById("select_local").value;
var S=document.getElementById("S").value;
//document.getElementById("ok").value="/e/action/ListInfo.php?classid=4&ph=1&"+SS+"="+encodeURI(S)+"&local="+encodeURI(S_local);
window.location="/e/action/ListInfo.php?classid=4&ph=1&"+SS+"="+encodeURI(S)+"&local="+encodeURI(S_local);}
</script><select id="select_local" style="position:relative;left:-2px;top:2px;height:24px;font-weight:bold;">
<option value="">地区</option>
<option value="国内">国内</option>
<option value="境外">境外</option>
</select>
<select id="select" style="position:relative;left:-2px;top:2px;height:24px;font-weight:bold;">
<option value="ids">序号</option>
<option value="status">状态</option>
</select>
<input type="text" id="S" style="font-weight:bold;width:100px;height:20px;border: 1px solid #999999;"/>
<a href="#" onClick="shai()"/><b>提交</b></a>
<a href="/e/action/ListInfo.php?classid=4"/><b>全部</b></a>我想要实现比如筛选 【国内】-【状态】-“正常”的数据,点击提交,就访问
/e/action/ListInfo.php?classid=4&ph=1&status=正常&local=国内但问题是第一次点击了好使,打开访问页面后,再筛就不好使了。
解决方案 »
- 购物车里怎样实现点击不同商品的"+"和"-"更新相应商品input里的数量?
- 100分在线等,求JS柱状图 带负轴的!!
- 如何记录可变路径以及读取路径
- javascript实现表格
- 这个怎么写啊~~,急~~在线等~~
- 关于图片预载和window.onload事件的疑惑?
- 三级联动问题
- 高分请教:模式对话框中是不是不能设置iframe的designMode=“on”属性啊?
- jquery checkbox 全选反选代码只能执行一遍,第二次就失败
- 如何解决需要在跳转url添加header的host参数?
- 考考大家jquery的基本功如何,关于选择器
- 【求助】js控制iframe的超链接都不弹出新窗口
var SS=document.getElementById("select").value;
var S_local=document.getElementById("select_local").value;
var S=document.getElementById("S").value;这些对象是不是存在
<a href="/e/action/ListInfo.php?classid=4"/><b>全部</b></a>应该这么写: <a href="#" onClick="shai()"><b>提交</b></a>
<a href="/e/action/ListInfo.php?classid=4"><b>全部</b></a>另外建议尽量别这么提交,最好用form提交,虽然你转码了,还是容易出现乱码。
var S_local=document.getElementById("select_local").value;
上面这样获取不到select的值,这样来获取试试
document.getElementById("select").options[document.getElementById("select").options.selectedIndex].value;
第一次提交没变,第二次到这个页面的时候S发生变化
window.location="/e/action/ListInfo.php?classid=4&ph=1&"+SS+"="+encodeURI(S)+"&local="+encodeURI(S_local);
/e/action/ListInfo.php?classid=4&ph=1&status=正常&local=国内
你的SS=status 会不会第二次变成其他的呢 如SS=stat