私は初心者で学習段階です。入力の詳細をあるページ(test1.html)から次のページのテキストエリア(test2.html)に渡したいと思います。両方のhtmlファイルを添付します。あなたが名前を付ける必要があり入力内容をあるページから別のページに渡すテキストエリア
test1.html(最初のページ)
<html>
<body>
<form method="post" action="test2.html">
<label><b>Customer Name</b></label>
<input type="text" placeholder="Enter Customer Name" name="cname" id="cname" required>
<script>
function() {
localStorage.setItem('mySharedData1', document.getElementById('cname').value);
}
</script>
<button type="submit" name='submit' id='submit'>Submit</button>
<input type="checkbox" checked="checked"> Remember me
</body>
</html>
test2.html(2ページ目)
<html>
<body>
<form method="get" action="test1.html">
<fieldset class="fieldset-auto-width">
<legend><b><font color="#0000FF">Your Bookings Are..!</font color></b></legend>
<textarea cols="35" rows="19" id="Requirement1" ></textarea>
<script type="text/javascript">
var mySharedData = localStorage.getItem('mySharedData1');
function(){
\t Requirement1.value =Requirement1.value+document.getElementById('mySharedData1').innerHTML+this.value+", ";
}
</script>
</fieldset>
</form>
</body>
</html>
問題があるか、どのように行うのか分かりませんか? – CherryPlaysRoblox
テキストが第2ページのテキスト領域に表示されません。私はどのように私は "getvalue()"関数を呼び出すことができます –