Flaskで入力フォームを作成すると、初めから空白文字が入ってしまいます。
- Flaskで入力フォームを作成して表示すると、ページを開いた状態ですでに空白文字が入力フォームに入ってしまって、placeholderがうまく作動しません。どのようにすれば良いのかアドバイスいただけると幸いです。
python
1from flask import Flask, render_template 2 3app = Flask(__name__) 4 5@app.route('/') 6def index(): 7 return render_template('index.html') 8 9if __name__ == '__main__': 10 app.debug = True 11 app.run()
html
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<html lang="ja"> 3 <head> 4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 5 <title>hogehoge</title> 6 </head> 7 <body bgcolor=""> 8 <h1>hogehoge</h1> 9 <textarea cols=50 rows=20 placeholder="Please input"> 10 </textarea> 11 <input type="submit" value="送信"> 12 </input> 13 </body> 14</html>
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2016/09/21 11:04