5つのテキストエリアがあります。この1からの質問のために、4答えテキストエリアのデータをtxtファイルに書き込む方法
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
Question <br /> <textarea id="question" rows="4" cols="70"></textarea>
<br /><br /><br /><br />
Answer <input id="answer1" type="checkbox" name="" value=""> <textarea rows="4" cols="70"></textarea>
<br /><br />
Answer <input id="answer2" type="checkbox" name="" value=""> <textarea rows="4" cols="70"></textarea>
<br /><br />
Answer <input id="answer3" type="checkbox" name="" value=""> <textarea rows="4" cols="70"></textarea>
<br /><br />
Answer <input id="answer4" type="checkbox" name="" value=""> <textarea rows="4" cols="70"></textarea>
<br /><br />
<button type="button">Save</button>
</head>
<body>
</body>
</html>
のための答え 回答のための質問 ID = "回答*" のために= "質問" idが2つまたは3つまたは4つ
することができ答えがchekboxを追加しました。このチェックボックスは正解を修正する必要があります チェックボックスをオンにした場合、クラスの保存ボタンをクリックした後にその欲しいものを追加します。 "正解"
は
「保存」ボタンを持っている私は、この形式ではtxtファイルへでテキストエリアからのデータ保存用のスクリプトが必要になります。
CODE
<div id="seconddiv" class="centered">
<h2>Question</h2>
<ul class="simpleList">
<li class="simpleListAnswer correct"> <span class="fa fa-square-o"></span>
<span class="simpleListText">A. Correct Answer</span></li>
<li class="simpleListAnswer"> <span class="fa fa-square-o"></span>
<span class="simpleListText">B. Incorrect Answer</span></li>
<li class="simpleListAnswer"> <span class="fa fa-square-o"></span>
<span class="simpleListText">G. Incorrect Answer</span></li>
<li class="simpleListAnswer"> <span class="fa fa-square-o"></span>
<span class="simpleListText">D. Incorrect Answer</span></li>
</ul>
</div>
私は私が何をしたいのか説明したいと考えています。 ...終わり
は私が得た:データとTXTファイル:
<div id="seconddiv" class="centered">
<h2>Question 1</h2>
<ul class="simpleList">
<li class="simpleListAnswer correct"> <span class="fa fa-square-o"></span>
<span class="simpleListText">A. Correct Answer</span></li>
<li class="simpleListAnswer"> <span class="fa fa-square-o"></span>
<span class="simpleListText">B. Incorrect Answer</span></li>
<li class="simpleListAnswer"> <span class="fa fa-square-o"></span>
<span class="simpleListText">G. Incorrect Answer</span></li>
<li class="simpleListAnswer"> <span class="fa fa-square-o"></span>
<span class="simpleListText">D. Incorrect Answer</span></li>
</ul>
</div>
<div id="seconddiv" class="centered">
<h2>Question</h2>
<ul class="simpleList">
<li class="simpleListAnswer"> <span class="fa fa-square-o"></span>
<span class="simpleListText">A. Inorrect Answer</span></li>
<li class="simpleListAnswer correct"> <span class="fa fa-square-o"></span>
<span class="simpleListText">B. Correct Answer</span></li>
</ul>
</div>
<div id="seconddiv" class="centered">
<h2>Question</h2>
<ul class="simpleList">
<li class="simpleListAnswer"> <span class="fa fa-square-o"></span>
<span class="simpleListText">B. Incorrect Answer</span></li>
<li class="simpleListAnswer"> <span class="fa fa-square-o"></span>
<span class="simpleListText">G. Incorrect Answer</span></li>
<li class="simpleListAnswer correct"> <span class="fa fa-square-o"></span>
<span class="simpleListText">D. Correct Answer</span></li>
</ul>
</div>
等...等...