0
我想知道怎麼做的鍵如:1,2,3 ... 現在,這是我的代碼:本地存儲列表鍵
<input type='text' id='provedor' />
<input type='text' id='login' />
<input type='text' id='senha' />
<input type='text' id='link' />
<input type='text' id='id' />
<button onclick="save()" type="button">Save</button>
<script>function save(){
var json = {};
json.login = $('#login').val();
json.senha = $('#senha').val();
json.link = $('#link').val();
json.id = $('#id').val();
var provedor = document.getElementById('provedor').value;
localStorage.setItem(provedor, JSON.stringify(json));}
我需要這列出結果。請幫幫我。萬分感謝!!
你必須對你想要做的更加清晰。 – Blazemonger 2015-02-10 22:29:28
http://stackoverflow.com/questions/3138564/looping-through-localstorage-in-html5-and-javascript – mrak 2015-02-10 22:35:44