I want to create a link on a webpage that would close the currently active tab in a browser without closing other tabs in the browser.(我想在网页上创建一个链接,该链接将关闭浏览器中当前处于活动状态的标签,而不关闭浏览器中的其他标签。)
When the user clicks the close link, an alert message should appear asking the user to confirm with two buttons, "YES" and "NO".(当用户单击关闭链接时,将出现一条警告消息,要求用户使用两个按钮“是”和“否”进行确认。) If the user clicks "YES", close that page and If "NO", do nothing.(如果用户单击“是”,则关闭该页面,如果“否”,则不执行任何操作。)
How can it be done?(如何做呢?) Any suggestions?(有什么建议么?)
ask by Naveed translate from so
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…