现在有一个html页面,需要对页面input输入框做缓存,如果用户有输入改动,将输入或修改的信息保存到本地缓存中,提升用户体验。
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>INPUT LOCAL STORAGE</title>
</head>
<body>
<input type="text" id="input1" value="{
{ input1 }}" placeholder="input1"/>
<input type="text" id="input2" value="{
{ input2 }}" placeholder="input2"/>