onclick="javascript:window.location.href后面带参数如何加

onclick="javascript:window.location.href后面带参数怎么加
有个from,里面有2个文本框
1、d_id
2、d_name

想通过onclick来提交参数,那么window.location.href=a.asp?d_id=XXX

XXX这个参数怎么写,把表单中2个文本框的值加进去,谢谢。
------解决思路----------------------
window.location.href='a.asp?d_id='+document.getElementById('d_id').value+'&d_name'+document.getElementById('d_name').value
------解决思路----------------------
你需要的只是一个明传址,这种方式会把参数以明文的方式传过去,这样是不安全的。虽然在技术上是可以实现的。

<form action="#">
    <input type="text" name="d_id" id="d_id"/><input type="text" name="d_name" id="d_name"/>
    <input id="btn" type="button" value="sublimt"/>
</form>
<script>
    document.getElementById('btn').onclick = function(){
        var d = document.getElementById('d_id').value;
        var name = document.getElementById('d_name').value;
        location.href = 'a.asp?d_id=' + d + '&d_name=' + name;
    }
</script>

其实我个人更建议这种post的方式来提交参数。
.asp直接可以根据name值获得input里边的值

<form action="a.asp" method="post" onsubmit="return send();">
    <input type="text" name="d_id" id="d_id"/><input type="text" name="d_name" id="d_name"/>
    <input id="btn" type="submit" value="sublimt"/>
</form>
<script>
    function send(){
        if(document.getElementById('d_id').value.length < 1){
            alert('请正确输入!');
            return false;
        }
        return true;
    }
</script>

------解决思路----------------------
下拉框:document.getElementById('id').value
单选框:var v=null,d=document.getElementsByName('a');for(var i in d)if(d[i].checked){v=d[i].value;break;}alert(v);