这是我直接从phpmyadmin里面的写法抓出来的
你可以参考看看
复制程式
<!--head 里-->
<script language="JavaScript">
function confirmLink(theLink, theSqlQuery)
{
// Confirmation is not required in the configuration file
// or browser is Opera (crappy js implementation)
if (confirmMsg == '' || typeof(window.opera) != 'undefined') {
return true;
}
var is_confirmed = confirm(confirmMsg + ' :\n' + theSqlQuery);
if (is_confirmed) {
theLink.href += '&is_js_confirmed=1'
}
return is_confirmed;
}
var confirmMsg = '您确定要 '
</script>
<!--body 里-->
<A href="#" onClick="return confirmLink(this, 'DELETE FROM `addressbook`')">delete</a>