论坛首页 Web前端技术论坛

向prototype过渡的登陆窗口例子

浏览 2697 次
精华帖 (0) :: 良好帖 (0) :: 新手帖 (0) :: 隐藏帖 (0)
作者 正文
   发表时间:2008-09-19  

看到prototype做的小窗口比较爽,也动手试了试,有点问题不得其解,是不是生成小窗口不能直接锁定背景

我本希望做成当点击登陆的时候,出现锁定背景效果,打开一个小的登陆窗口,像Dialog样式一样,结果没搞定

<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=gbk"/>
	<script type="text/javascript" src="prototype.js"> </script>
	<script type="text/javascript" src="window.js"> </script>
	<script type="text/javascript" src="effects.js"> </script>
	<script type="text/javascript" src="debug.js"> </script>
	<link href="default.css" rel="stylesheet" type="text/css"/>
	<link href="alert.css" rel="stylesheet" type="text/css"/>
	<link href="alphacube.css" rel="stylesheet" type="text/css"/>
	<link href="mac_os_x.css" rel="stylesheet" type="text/css"/>
	<title>弹出登陆小窗口</title>
</head>

<body>
<a href="#" onclick="openWin()">标准窗口</a><br/>
<a href="#" onclick="openWin2()">Dialog方式</a><br/>

<script type="text/javascript">
  
  function openWin() {
    win = new Window({className: "mac_os_x",url:"login.htm", title: "Sample", width:200, height:150, destroyOnClose: true, recenterAuto:false})
	win.showCenter();
  }
  function openWin2() {
      Dialog.confirm({url: "login.htm", options: {method: 'post'}}, 
                     {top: 10, width:250, className: "alphacube",okLabel: "Close All"})    
  }
</script>
</body>
</html>

 

论坛首页 Web前端技术版

跳转论坛:
Global site tag (gtag.js) - Google Analytics