纯js文件弹出窗写法

        <dialog id="myDialog"> 01234567890
		<a href="javascript:;" id="closedilog" onclick="closedilog()">x</a>
	</dialog>
                        function opendialog() {
				var x = document.getElementById("myDialog");
				x.open = true;
			}

			function closedilog() {
				var close = document.getElementById("myDialog");
				close.open = false;
			}
posted @ 2017-11-16 11:12  FE-神鸟  阅读(613)  评论(0编辑  收藏  举报