梦之都
JavaScript教程
,
close
()函数,点击按钮直接关闭窗口的示例,由于此窗口是open函数打开的因此不会有提示框
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <title>点击按钮直接关闭窗口 close() 函数示例</title> </head> <body> <input type="button" value="点击按钮直接关闭窗口!" onclick="window.close();" /> </body> </html>