确认消息无效

时间:2014-03-22 14:27:57

标签: html

我正在从表中删除一行但在删除之前我想要一个确认消息。我尝试使用onclick和onsubmit return confirm(),但它不起作用。任何帮助都会很好。

 echo '<td><a href="#" title="Delete" rel='.$row['IO_ID'].' onsubmit="return confirm("Really Delete?"); class="button red">
        </a></td>';

2 个答案:

答案 0 :(得分:3)

这将是

onsubmit="return confirm('Really Delete?');"

答案 1 :(得分:1)

您的回音中存在语法错误。这有效:

 <table>
      <tr>
           <td><a href="#" title="Delete" rel='.$row['IO_ID'].' onsubmit="return confirm('Really Delete?');" class="button red">test
    </a>
           </td>
     </tr>
</table>
相关问题