当前位置: 首页 > 工具软件 > jmpopups > 使用案例 >

弹出 div jquery.jmpopups-0.5.1.js

方琦
2023-12-01

<script type="text/javascript" src="<%=request.getContextPath()%>/script/jquery-1.3.2.min.js"></script>

<script type="text/javascript" src="<%=request.getContextPath()%>/script/jquery.jmpopups-0.5.1.js"></script>

<script type="text/javascript">

//<![CDATA[

$.setupJMPopups({

screenLockerBackground: "#003366",

screenLockerOpacity: "0.7"

});

 

function openStaticPopup() {

$.openPopupLayer({

name: "myStaticPopup",

width: 350,

target: "myHiddenDiv"

});

}

//delete

function deleteObj(id){

var msg = '数据删除将无法恢复,您确认删除吗?';

if(!confirm(msg)){

return false;

}

}

public function update(id){

$.post("<%=request.getContextPath()%>/category/getById", 

{ id:id},

function(data){

    if(data=='success'){

    alert('恭喜您,删除成功!');

    }else if(data == 'fail'){

    alert('取得数据错误,请稍候重试,或联系管理员!');

    }

}); 

}

 

//]]>

</script>

<style type="text/css" media="screen">

body {margin:0; font-family:"Trebuchet MS"; line-height:120%; color:#333;}

h1 {margin-bottom:50px; font-size:40px; font-weight:normal;}

p {margin:0; padding:0 0 30px; font-size:12px;}

pre {font-size:12px; font-family:"Consolas","Monaco","Bitstream Vera Sans Mono","Courier New","Courier"; line-height:120%; background:#F4F4F4; padding:10px;}

#general {margin:30px;}

#myHiddenDiv {display:none;}

.popup {background:#FFF; border:1px solid #333; padding:1px;}

.popup-header {height:24px; padding:7px; background:url("<%=request.getContextPath()%>/script/bgr_popup_header.jpg") repeat-x;}

.popup-header h2 {margin:0; padding:0; font-size:18px; float:left;}

.popup-header .close-link {float:right; font-size:11px;}

.popup-body {padding:10px;}

form {margin:0; padding:0;}

form * {font-size:12px;}

input {margin-bottom:12px;}

label {display:block;}

</style>

<div id="myHiddenDiv">

<div class="popup">

<div class="popup-header">

<h2>添加分类</h2>

<a href="javascript:;" οnclick="$.closePopupLayer('myStaticPopup')" title="关闭" class="close-link">关闭</a>

<br clear="all" />

</div>

<div class="popup-body">

<table>

<tr>

<td colspan="2" align="center">类型管理</td>

</tr>

<tr>

<td>类型名称</td>

<td>

<input id = 'cid' type = "hidden" />

<input id = 'name' name = 'name' />

</td>

</tr>

<tr>

<td>类型描述</td>

<td>

<textarea id = 'description' name="description"></textarea>

</td>

</tr>

<tr>

<td colspan="2" align="center">

<input type='submit' value = '保存' />

</td>

</tr>

</table>

</div>

</div>

</div>

转载于:https://my.oschina.net/u/2296689/blog/545800

 类似资料: