From ea6a900d1ede290b50f679410877c7dfdabda0a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E5=8D=9A=E8=BD=A9?= Date: Fri, 15 Feb 2019 14:33:47 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0locoal?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/tool.blade.php | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/src/views/tool.blade.php b/src/views/tool.blade.php index 92f1dd1..30d0729 100644 --- a/src/views/tool.blade.php +++ b/src/views/tool.blade.php @@ -108,7 +108,7 @@ - +
@if( !empty($error) ) @@ -203,6 +203,29 @@ $trTemp.appendTo("#codeRequird"); }) } + function changeLocoal(params) { + var storage=window.localStorage; + var valKey = $("#method").find("option:selected").text(); + var data=editor.getValue(); + var d=JSON.stringify(data).replaceAll("\r|\n|\\s", ""); + storage.setItem(valKey,d); + } + + function changeNavShow(){ + var storage=window.localStorage; + for(var i=0;i'); + $trTemp.append(''+ key +''); + } + } + $('#submit-btn').bind('click',function(params) { + var storage=window.localStorage; + var valKey = $("#method").find("option:selected").text(); + var data=editor.getValue(); + var d=JSON.stringify(data); + storage.setItem(valKey,d); + })