可编辑按钮编辑所有字段

时间:2013-08-30 05:45:04

标签: javascript jquery html jeditable

我正在尝试获取下面index.html代码中的按钮,以允许在环境等形式中同时编辑/保存所有字段。我不知不觉it isn't working

感谢您的帮助。

<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>

0 个答案:

没有答案