0

我试图在index.html下面的代码中获取按钮,以允许在类似环境的表单中一次编辑/保存所有字段。不幸的是,它对我不起作用

谢谢您的帮助。

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js" type="text/javascript" charset="utf-8"></script>
<script type="text/Javascript" src="http://www.appelsiini.net/download/jquery.jeditable.js"></script>
<script type="text/javascript" charset="utf-8">
  $(document).ready(function() {
      $('.edit').editable('http://www.example.com/save.php', {
          indicator : 'Saving...',
          tooltip   : 'Click to edit...'
      });
      $('.edit_area').editable('http://www.example.com/save.php', { 
          type      : 'textarea',
          cancel    : 'Cancel',
          submit    : 'OK',
          indicator : '<img src="img/indicator.gif">',
          tooltip   : 'Click to edit...'
      });
  });

$(".edit_trigger").bind("click", function() {
    $(".edit_textfield").click();
});
</script>

<body>
<div class="edit" id="div_1">Dolor</div>
<div class="edit_area" id="div_2">Lorem ipsum dolor sit amet, consectetuer 
adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore 
magna aliquam erat volutpat.</div>

<button type="button" class="edit_trigger">Click this button and all the fields will become editable!</button>

</body>
4

0 回答 0