我的sisyphus.js/jquery html有什么问题?在重新打开页面时丢失用户表单输入

What's wrong with my sisyphus.js/jquery html? Losing user form input on re-opening page

本文关键字:新打开 输入 表单 用户 jquery js sisyphus html 问题 什么 我的      更新时间:2023-09-26

我正在尝试构建一个非常简单的word编程web应用程序Tome,具有使用sisyphus.js本地保存表单输入的功能。我按照正确的顺序调用了jquery,遵循了Alexander Kaupanin提供的所有语法,但它仍然会在

上返回默认文本。更新

重新打开页面(重新加载在Firefox上可以正常工作,但在Safari上不行)。这里有大约1公吨的html,所以我不会把整个源代码粘贴在这里,但是<head>是这样的:

  <head>
    <meta http-equiv="Content-Type" content=
    "text/html; charset=utf-8" />
    <title>
      Tome | A simple text editor
    </title>
    <link href="dark.css" rel="stylesheet" type="text/css" title=
    "default" />
    <link href="light.css" rel="alternate stylesheet" type=
    "text/css" title="alternate" />
    <link type="text/css" rel="stylesheet" media="print" href=
    "print.css" />
<script type="text/javascript" 
src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js">
</script>
    <script type="text/javascript" src=
    "http://streamerforipad.webs.com/Tome/sisyphus.js">
</script>
<script type="text/javascript"> $(window).load(function() { $('form').sisyphus(); }); </script>
  </head>

如果有什么建议就太好了,我对这整件事还比较陌生。

<script type="text/javascript"> $( &#039;#form&#039; ).sisyphus({timeout: 5}); </script>

不正确!

这是正确的代码:

<script type="text/javascript"> $(window).load(function() { $('form').sisyphus(); }); </script>

,# 039;= '

祝你好运!我在存储数据方面有很大的问题……(