javaScript 删除确认

<ahref="http://www.linglingmall.com"onclick="returnconfirm('确定?');">测试</a>

 
  1. <!DOCTYPEHTMLPUBLIC"-//W3C//DTDHTML4.01Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">

  2. <html>

  3. <head>

  4. <title>NewDocument</title>

  5. <metaname="Generator"content="EditPlus">

  6. <metaname="Author"content="">

  7. <metaname="Keywords"content="">

  8. <metaname="Description"content="">

  9. </head>

  10. <body>

  11. <script>

  12. functionchapter_delete(){

  13. varmsg="您真的确定要删除吗?\n若删除该章节,则该章节下的所有文章都将被删除!\n请确认!!!";

  14. if(confirm(msg)==true){

  15. returntrue;

  16. }else{

  17. returnfalse;

  18. }

  19. }

  20. </script>

  21. <ahref="chapter_delete.action?method:chapter_delete&chapter_id=24"onclick="returnchapter_delete();">删除</a>

  22. </body>

  23. </html>

你可能感兴趣的:(JavaScript)