Web_CSS_DIV相对浏览器定位及其关闭;

功能:DIV相对浏览器定位及其关闭。

>html源码


	
		hello
		
		
	
	
	
		
First,hello,world!
hello,world!
hello,world!
hello,world!
hello,world!
hello,world!
hello,world!
hello,world!
hello,world!
hello,world!
hello,world!
hello,world!
hello,world!
hello,world!
hello,world!
hello,world!
hello,world!
hello,world!
hello,world!
hello,world!
hello,world!
hello,world!
hello,world!
hello,world!
hello,world!
hello,world!
hello,world!
hello,world!
hello,world!
hello,world!
hello,world!
hello,world!
hello,world!
hello,world!
hello,world!
hello,world!
hello,world!
hello,world!
hello,world!
hello,world!
hello,world!
hello,world!
hello,world!
hello,world!
hello,world!
hello,world!
hello,world!
hello,world!
hello,world!
hello,world!
hello,world!
hello,world!
hello,world!
hello,world!
hello,world!
hello,world!
hello,world!
hello,world!
hello,world!
hello,world!
hello,world!
last,hello,world!
关闭

>js源码

window.onload = initFn;

function initFn() {
	// 关闭按钮
	var closeBtn = document.getElementById("closeBtn");
	closeBtn.onclick = function(){
		// 浮动DIV
		var floatDiv = document.getElementById("fDiv");
		floatDiv.style.display	= 'none';		//不显示;
	}
	
}


你可能感兴趣的:(Web)