<script language=javascript>
function delconfirm()
{ if(confirm("确定要删除?"))
     return ture;
  else
     return false;
}
</script><form action="**" onsubmit="return delconfirm()">
<input type="submit" value="删除">
</form>

解决方案 »

  1.   

    这个问题以前n多的人都问过,回答这个不好意思拿你的分,
    所以多说点,你那些代码最好这样写:<table>
    <?php
    while(list($yezhuid,$yezhuname)=mysql_fetch_row($res))
    {
    ?>
    <tr>
    <form action=deleteyezhu.php method=post>
    <input type=hidden name=yezhuid value=<?=$yezhuid?>>
    <td>
    <input type=submit value=删除>
    </td>";
    <td><?=$yezhuname?></td>
    </tr>";
    </form>
    <?
    }
    ?>
    </table>这样省了n多的echo和引号,还可以免去必须对某些特殊字符进行转义转换的麻烦。:)
      

  2.   

    而且这样由于那些不再是php代码,就可以为php解释器减轻大量的负担。