php传递参数jsp
需求是把textarea传递到savexml.php进行数据保存,但同时我希望页面还留着当前页面。
代码如下:
<form name="form1" id="form1" method="post" action="newtest.php"> <input type="hidden" name="text1" value="<?php echo $text1;?>" size="30"/><br> <textarea name="textarea1" rows="10" cols="150"><?php echo $text1;?></textarea><br> <input type="button" name="finish" value="完成拆分" onClick="save()" /> </form> function save(){ //省略的代码是获得textarea的值 var formdeal= document.getElementById("form1"); formdeal.action="savexml.php?parms="+str; formdeal.target="_self"; formdeal.submit();}后台接收如下:<?php $str1=$_REQUEST['parms'];?>
PHP怎么学习?PHP怎么入门?PHP在哪学?PHP怎么学才快?不用担心,这里为大家提供了PHP速学教程(入门到精通),有需要的小伙伴保存下载就能学习啦!
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号