javascript的问题,高手帮啊

来源:百度知道 编辑:UC知道 时间:2024/06/08 18:15:49
本人刚入门,像下面这种弹出窗体怎么实现的?

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<style>
.box{
float:none;width:300px;height:300px;border:1px solid #ededed;position:absolute;
margin:100 200;/*这里可以指定弹出位置*/
}
.title{
float:left;width:100%;height:25px;background:Blue;color:white;
}
.context{
float:left;width:100%;height:275px;background:white;
}
.close{
position:absolute;top:0px;left:250px;color:Red;cursor:hand;
}
</style>
<script>
////弹出对话框
var Dialog = function Dialog(title,context){
this.panel = function(id,cname){
var tdiv = document.createElement("DIV");
tdiv.className = cname;
return tdiv;
}
var CC = this.panel("cc_context","box"),body = this.panel("cc_body","context"),C_title = this.panel("cc_title",&