如:
var key=["sid=abc","pid=123","img=123.jpg"]
然后
window.open( window.location.href.split('?')[0] +"?"+ key.join("&"))
setTimeout() 和 cleartimeout() 是逆过程 可以查看用法是否正确,我处理过的一段 如下 var action=setTimeout(function(){...},1000)if(action) clearTimeout(action)<select name="a" id="a"><option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
</select>
<select name="b" id="b">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
</select>
<select name="c" id="c">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
</select>
<input type="text" id="f">
<script>
var d = document,
a = d.getElementById('a'),
b = d.getElementById('b'),
c = d.getElementById('c'),
f = d.getElementById('f')
fn = function(){
f.value = +a.value+(+b.value)+(+c.value)
}
a.onchange = fn
b.onchange = fn
c.onchange = fn
</script>