我的原代码是:<a href="deleteQzxttAction.action?qzxttId=${qzxtt.qzxttId}">删除</a>写成这样:<a href= "" onclick='javascript:if (confirm("您确定要删除此问卷吗? ")) {"deleteQzxttAction.action?qzxttId=${qzxtt.qzxttId}"} else {return false}'>删除</a>有确认对话框出来,但是点确定之后没有执行到删除动作。
注:原代码是可以删除的,被我加上删除的确认后就不能删除了。

解决方案 »

  1.   

    <a href="deleteQzxttAction.action?qzxttId=${qzxtt.qzxttId}" onclick="return confirm('确定要删除吗?')">删除</a>
      

  2.   

    <a href= "" onclick='javascript:if (confirm("您确定要删除此问卷吗? ")) {window.location.href="deleteQzxttAction.action?qzxttId=${qzxtt.qzxttId}"} else {return false}'>删除</a>
      

  3.   


    你把这里的{"deleteQzxttAction.action?qzxttId=${qzxtt.qzxttId}"}中的双引号删掉,试试!!
      

  4.   

    <a onclick='javascript:if(!confirm("您确定要删除此问卷吗?")) return false' href="deleteQzxttAction.action?qzxttId=${qzxtt.qzxttId}">删除</a>
      

  5.   

    onclick="return confirm('是否删除')"
      

  6.   

    onclick="return confirm('确定要删除吗?')"
      

  7.   

    不要偷懒  有时候定义个方法会好 function test()
    {
     var b = contrin("aaa");
    if(b)
    {
    doAnyThing..........
    }
    }
      

  8.   

    <a href='javascript:if (confirm("您确定要删除此问卷吗? ")) {"deleteQzxttAction.action?qzxttId=${qzxtt.qzxttId}"}'>删除</a>
      

  9.   

     <a href="deleteQzxttAction.action?qzxttId=${qzxtt.qzxttId}" onclick="return confirm('确定要删除')">删除</a>