PHP 打印 $_POST['something'],无需刷新
PHP Printing $_POST['something'] without refresh
我得到了这个代码。
<!--Speech Bar-->
<div clasS="speech_bar">
<iframe name="speechs" style="display:none;"></iframe>
<form method="get" target="speechs">
<input type="text" id="speech_input_welcome" name="speech_input_welcome" placeholder="Click here to speak..">
<input type="submit" id="speech_welcome" name="speech_welcome" value="Say">
</form>
</div>
然后这个:
<!--Welcome Room-->
<div class="welcome_room">
<center>
<img src="http://www.habborator.org/exec/speech/bubble.php?name=Frank&text=Hello%20there!%20I%20am%20Frank%20and%20today%20I%20will%20help%20you.&format=say">
<br />
<img src="http://www.habborator.org/exec/speech/bubble.php?name=Frank&text=To%20enter%20Project.%20HTML..%20Please%20say%20if%20you're%20registrated%20or%20not.&format=say">
<br />
<img src="http://www.habborator.org/exec/speech/bubble.php?text=Write%20'registrated'%20or%20'new'.&format=whisper">
</center>
<?php
if(isset($_POST['speech_welcome']))
{
if($_POST['speech_input_welcome'] == 'registrated')
{ ?>
<center>
<img src="http://www.habborator.org/exec/speech/bubble.php?name=You&text=Registrated.&format=say">
<br />
<img src="http://www.habborator.org/exec/speech/bubble.php?name=Frank&text=Alright!%20Welcome%20back%20to%20Project.%20HTML%20then!%20Tell%20me%20your%20name%20please.&format=say">
</center>
<?php }
else if($_POST['speech_input_welcome'] == 'new')
{ ?>
<center>
<img src="http://www.habborator.org/exec/speech/bubble.php?name=You&text=New.&format=say">
<br />
<img src="http://www.habborator.org/exec/speech/bubble.php?name=Frank&text=Alright!%20Welcome%20to%20Project.%20HTML%20then!%20Tell%20me%20a%20name%20please.&format=say">
</center>
<?php }
else
{ ?>
<center>
<img src="http://www.habborator.org/exec/speech/bubble.php?name=You&text=<?php echo $_POST['speech_input_welcome']; ?>&format=say">
<br />
<img src="http://www.habborator.org/exec/speech/bubble.php?name=Frank&text=Sorry%20I%20couldn't%20understand%20you.&format=say">
</center>
<?php }
}
?>
</div>
我想做什么:就像在不刷新侧面的情况下回声$_POST['speech_input_welcome']
一样,因为我得到了一个disabled
refreshment
的iframe
.我尝试使用echo $center2 = 'lalal';
但它不会在不刷新的情况下加载$_POST
,而且我真的不能将MySQL
或类似的东西用于此过程。
这可能会
有所帮助:)
http://api.jquery.com/load/
问候
相关文章:
- 强制模板刷新ember.js
- 如何通过ajax刷新JSF填充的javascript变量
- 如何解决Yii中的页面刷新问题
- Jquery提交表单而不刷新
- 刷新页面后会出现警报
- 刷新后保留对网页的更改
- 如何在不刷新页面的情况下更新显示框
- 重定向时角度刷新浏览器
- 如何防止jQueryonclick事件中的Ruby方法在页面刷新时执行
- Javascript,输出结果后页面不断刷新
- $(document).height()在刷新时随机化值(Safari 5.1.10)
- 刷新父窗口后无法关闭窗口
- 刷新页面时hasClass不起作用
- X秒后刷新select元素
- 这.SOMETHING 总是返回未定义的 - extjs
- chart.series[id].remove()无法刷新高位图表/高位股票中其他系列的图例属性
- 触发媒体查询断点时刷新页面
- 如何刷新列表框内容onclick或blur事件
- 如何在火狐浏览器中禁用F5和刷新
- PHP 打印 $_POST['something'],无需刷新