簡體   English   中英

我如何從html表單中獲取輸入並添加到python腳本中

[英]How can i take input from a html form and add to to a python script

我有此腳本用於匯總文本,並希望從html文本字段中輸入內容以將其輸入到腳本中,並且它們在頁面上顯示結果。

我目前有

title = raw_input('Type a title for the text here:')
content = raw_input('Type the text to be summarized here:')

我如何更改它以從html表單獲取輸入?

Title:< input type = "text>
Content:< input type = "text>

我不確定當您說要將其作為脫機網頁時是什么意思。 您將需要使用服務器來處理。 本文位於: http : //docs.python.org/2/howto/webservers.html解釋了這樣的系統。 准備好將其放在服務器上后,您可以查看http://learnpythonthehardway.org/book/ex51.html ,了解如何使用python處理網絡表單。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM