我正在努力学习Python,目前正在练习51。其中,要求学生添加文件模板/索引.html链接返回,这样我们就可以继续填写表单并查看结果。我的代码如下:
/bin
app.py
/static
/templates
hello_form.html
index.html
/tests
在应用程序副本内容如下:
^{pr2}$在索引.html内容如下:
$def with (greeting)
$if greeting:
I just wanted to say <em style="color: green; font-size: 2em;">$greeting</em>
$else:
<em>Hello</em>, world!
你好_表单.html内容如下:
<h1>Fill out this form</h1>
<form action="/hello" method="POST">
A Greeting: <input type="text" name="greet">
<br/>
Your Name: <input type="text" name="name">
<br/>
<input type="submit">
</form>
这个链接是表单上的按钮,不是吗? 如何为这个按钮添加处理程序?在
提前谢谢你的帮助。在
这可以用基本的html来完成。如下所示:
应该做这个工作。在
在最后一个正文标记之前输入:
这样你就可以回到表单页面了。在
我加了这几行索引.html而且成功了。在
有关详细信息,请访问https://www.computerhope.com/issues/ch000317.htm
希望有帮助。在
相关问题 更多 >
编程相关推荐