>  기사  >  웹 프론트엔드  >  window.open은 js_기본 지식의 새 페이지를 엽니다.

window.open은 js_기본 지식의 새 페이지를 엽니다.

WBOY
WBOY원래의
2016-05-16 16:40:001199검색
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 
<html> 
<head> 
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 
<title>Insert title here</title> 
<script type="text/javascript"> 
/* 打开同一个新的页面,不会再次打开新页面 */ 
function open1(){ 
  window.open("html01.html","aaa"); 
} 
function open2(){ 
  window.open("html02.html","aaa"); 
} 
</script> 
</head> 
<body> 
  <a href="#" rel="external nofollow" rel="external nofollow" onclick="open1()">点击进入1</a> 
  <a href="#" rel="external nofollow" rel="external nofollow" onclick="open2()">点击进入2</a> 
</body> 
</html>
성명:
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.