客户端确认

azurewrath 2002-11-06 10:16:35
有如下一段代码:

<td nowrap align=center><input type=button value=删除 onclick="strUrl = 'cmfindall.jsp?selectoperation=findallmometa&type=<%=metadataInfo[i].getType()%>';document.location.href = strUrl;"></td>

如何给该按钮加上确认的对话框?
...全文
37 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
无爱大叔 2002-11-06
  • 打赏
  • 举报
回复
if(confirm("确定删除")){
//true
}else{
//false
}
meizz 2002-11-06
  • 打赏
  • 举报
回复
<td nowrap align=center><input type=button value=删除 onclick="if(confirm('你确定要删除??'))document.location.href='cmfindall.jsp?selectoperation=findallmometa&type=<%=metadataInfo[i].getType()%>'"></td>

87,904

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧