【发布时间】:2018-04-06 19:15:10
【问题描述】:
如何使用 localstorage 从我的 html 页面上的输入字段中设置值。 就像我在输入字段中输入一些东西,例如“你好”,然后按下按钮提交。然后页面的标题应更改为“Hello”。但如果可能的话,它需要保存在本地存储中。
<p>Hello</p>
<div class="form-group">
<label for="text">Change title:</label>
<input type="text" class="form-control inputBox" id="text" name="text">
</div>
<button>submit</button>
【问题讨论】:
标签: javascript jquery html local-storage