日期:2014-05-18  浏览次数:20416 次

求助!!!javascript href 参数的问题
代码如下: <input   type= "button "   name= "query "   id= "query "   value= "query "     onclick= "javascript:window.location.href= 'list_report.asp?startdate= '+document.getElementById( 'startdate ').value&amp;enddate= '+document.getElementById( 'enddate ').value; "/>

单独传?startdate= '+document.getElementById( 'startdate ').value或传enddate= '+document.getElementById( 'enddate ').value   参数没问题,要两个一起传就不知道怎么写了,总是出错!求达人帮助啊!

------解决方案--------------------
input type= "button " name= "query " id= "query " value= "query " onclick= "javascript:window.location.href= 'list_report.asp?startdate= '+document.getElementById( 'startdate ').value + '&enddate= '+document.getElementById( 'enddate ').value; "/>