Python 需要帮助以html的形式显示值吗
我需要显示用户单击submit按钮后在表单中输入的值。它会在一瞬间显示它,但当页面重新加载时,它就消失了Python 需要帮助以html的形式显示值吗,python,html,Python,Html,我需要显示用户单击submit按钮后在表单中输入的值。它会在一瞬间显示它,但当页面重新加载时,它就消失了 <html> <html> <head> <link rel="stylesheet" href="{{url_for('static',filename='main.css')}}"> </head> <body> <title> Patent Info <
<html>
<html>
<head>
<link rel="stylesheet" href="{{url_for('static',filename='main.css')}}">
</head>
<body>
<title> Patent Info </title>
<form action="" method="POST" >
Enter Room Number <input type="number" name="getInput" id="data" min="1" max="5">
<input type="submit" onclick="c.value = getInput.value">
<h4>Going to Room: <output name="c"></output></h4>
</form>
我知道如果我从类型submit更改为类型button,我可以这样做,但是我的POST方法不起作用试试这个
<h4>Going to Room: <output name="c">{{ nopol }}</output></h4>
去房间:{{nopol}
试试这个
<h4>Going to Room: <output name="c">{{ nopol }}</output></h4>
去房间:{{nopol}
只需在下面添加这个去房间:
{{nopol}
只需将此添加到下面进入房间:
{{nopol}
但它不会显示,因为您必须在数据库中存储数据,但它不会显示,因为您必须在数据库中存储数据