传递参数,超级简单,急急急!!!!! 你总要输出的吧,在之前输出的页面 直接写在后面不就好了?要不呢 你这个values 从哪里来?不行就JS吧... 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 values值是自己输入的,另外用JS怎么弄啊 document.form.startDate.valueform 等于你的form表单name <input type="text" name="startDate" value=""/><input name="cx" type="button" value="查询" onclick="javascript:window.location.href='index.php?new='+document.getElementsByName('startDate')[0].value" />但为什么要把简单的事情弄复杂呢?<form action='index.php'><input type="text" name="new" value=""/><input name="cx" type="submit" value="查询"/></form> 有jquery吗? 如果有jquery<input type="text" id="startDate" name="startDate" value=""/><input name="cx" type="button" value="查询" onclick="javascript:window.location.href='index.php?new=$('#startDate').val()" /> echo date('Y-m-d', strtotime('+1 day 2014-05-20'));2014-05-21 表示没有处理过于高端的js经验,jquery的方式可以尝试一下,不行就写一个js函数嘛,慢慢学习 写个function 处理较好。 <input type="text" name="startDate" value=""/> <input name="cx" type="button" value="查询" onclick="cx()" /> <script type="text/javascript"> function cx(){ window.location.href='index.php?new=' + document.getElementsByName('startDate')[0].value; } </script> 为什么么不用表单post提交呢~ 如果非要这样写的话 用js处理一下也可以弄- - PHP5.0 加IIS7.0 浏览出问题 在一个文件里设置global无效 php模板解析问题 php 更新图片 却不能显示??? 请问:Pear导出Excel, 如何在Spreadsheet_Exce l_Writer中添加中文的工作表? 提个菜鸟的问题。见笑了。 下载系统的问题 请问:PHP编短信程序难吗? 这是什么错误? 一个很简单的问题,请大家解答,送分,谢谢 关于php和js变量传值的问题 js中Array对象疑问
form 等于你的form表单name
<input name="cx" type="button" value="查询" onclick="javascript:window.location.href='index.php?new='+document.getElementsByName('startDate')[0].value" />但为什么要把简单的事情弄复杂呢?<form action='index.php'>
<input type="text" name="new" value=""/>
<input name="cx" type="submit" value="查询"/>
</form>
<input type="text" id="startDate" name="startDate" value=""/>
<input name="cx" type="button" value="查询" onclick="javascript:window.location.href='index.php?new=$('#startDate').val()" />
<input name="cx" type="button" value="查询" onclick="cx()" />
<script type="text/javascript">
function cx(){
window.location.href='index.php?new=' + document.getElementsByName('startDate')[0].value;
}
</script>