public_chip-submit.tpl 951 B

1234567891011121314151617181920212223242526272829
  1. <script src="{$Think.config.base_url}/static/common/js/jquery.form.js"></script>
  2. <script type="text/javascript">
  3. $(function() {
  4. var options[name] = {
  5. beforeSubmit: function() {
  6. },
  7. success: function (data) {
  8. if(data.code==1) {
  9. if(data.seconds!="") {
  10. $.toast(data.msg);
  11. setTimeout(
  12. function() {
  13. window.location.href = data.forward;
  14. }
  15. ,data.seconds * 1000);
  16. }
  17. else {
  18. window.location.href = data.forward;
  19. }
  20. }
  21. else {
  22. $.toast(data.msg, "forbidden");
  23. }
  24. }
  25. };
  26. $("#[name]").ajaxForm(options[name]);
  27. });
  28. </script>