我正在用 esp8266 micropython 写一个服务器 但在 html 中 我需要获取输入文本值 怎么办呢,谢谢大家的回答。。。 我不知道如何使用 recv(1024)
def Web_Page():
html="""<html>
<body>
<form action="192.168.1.1" methot="get">
<input type="text" name="text" id="text1">
<input type="submit" value="submit">
</form>
</body>
</html>"""
return html
s=socket.socket(socket.AF_INER,socket.SOCK_STREAM)
s.bind(('',80))
s.listen(5)
while(True):
conn,addr=s.accept()
request=conn.recv(1024)
request=str(request)
response=Web_Page()
conn.sendall(response)
conn.close()
我收到了 recv(1024) 的请求我试图打印 s.find("?/text") 但它没有帮助我