前提・実現したいこと
htmlから受け取ったform input name=entryの入力に色を付けた文字で返事を返す。
cssで返事に色を付けたい。
import省略
form=cgi.FieldStorage()
entry_name=form.getvalue("entry")
def entry_hail(en):
print("""
<!DOCTYPE html>
<html><head>
<meta http-equiv="content-type" charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="Refresh" content="10;url=/takuyahp-bin/takuyahp.html">
<title>Welcome {0}-San</title></head>
<body>
<h3>Thank you! {0}-San</h3>
<p>Happy to have a visit from you!</P>
<P>Back to hp in 10 sec.</p>
</body></html>
""".format(en))
if name== "main":
entry_hail(entry_name)
エラーメッセージ
KeyError: '\n color'
args = ('\n color',)
with_traceback = <built-in method with_traceback of KeyError object>
該当のソースコード
<style type="text/css"> h3{ color:red; } </style>試したこと
ここに問題に対して試したことを記載してください。
補足情報(FW/ツールのバージョンなど)
回答1件
あなたの回答
tips
プレビュー