A页一个输入框内填写的内容在点击确定按钮后传给B页的一个输入框。php的语言,尽量用最少的代码。我需要两个完整的页面,谢谢
a.html
<form action="b.php" method="post"><input type="text" name="word" />
<input type="submit" value="提交" />
</form>
b.php
<input type="text" name="word" value="<?php echo $_POST['word'];?>" />追问……
var obj=document.getElementById('username').value;
for(var i=0;i"z")&&(c"9")){
alert('只能是小写字母、数字!');
return false;
……不会写4-20字符限制,求教
alert('只能以不为数字开头的小写字母、数字,并且4到20位');
return false;
}追问
是不是有错误,输入什么都 return false;轮不到下面的return true;
追答 if ( !/^[^\d][a-z0-9]{3,20}$/g.test( c ) ) {alert('只能以不为数字开头的小写字母、数字,并且4到20位');
return false;
}
抱歉,刚才没有测试,这次测试了一下,通过
追问奇怪,我通不过,无论输入什么都会弹出提示
追答那就悲哀了!
问题是你的全部代码是什么?
做网页,你就是哪里随便弄错一个字母、标点或者哪里弄错一点点逻辑,都会出现整个错误!
做网页,可以用一句话来形容:“牵一发而动全身”
所以,你再好好琢磨一下啊!
温馨提示:答案为网友推荐,仅供参考
第1个回答 推荐于2017-09-04
新建一个index.html文件,在文件中创建一个form表单,表单提交到info.php页面
<form action="info.php" method="post"><input name="a" type="text" value=''/>
<input type="submit" value="提交" >
</form>
新建一个info.php文件,在input中直接使用$_POST输出index.html提交过来的数据
第2个回答 2019-10-19
新建一个index.html文件,在文件中创建一个form表单,表单提交到info.php页面
<form action="info.php" method="post">
<input name="a" type="text" value=''/>
<input type="submit" value="提交" >
</form>新建一个info.php文件,在input中直接使用$_POST输出index.html提交过来的数据
<input name='a' value='<?php echo $_POST['a'] ?>'>
<form action="info.php" method="post">
<input name="a" type="text" value=''/>
<input type="submit" value="提交" >
</form>新建一个info.php文件,在input中直接使用$_POST输出index.html提交过来的数据
<input name='a' value='<?php echo $_POST['a'] ?>'>
第3个回答 2013-10-31
a页面
<form method="post" action="b.php">
<input type="text" name="texta">
<input type="submit" value="提交"/>
</form>
b页面
<input type="text" value="<?=$_POST['texta']"?>"/>
<form method="post" action="b.php">
<input type="text" name="texta">
<input type="submit" value="提交"/>
</form>
b页面
<input type="text" value="<?=$_POST['texta']"?>"/>