jquery ui dialog modal 无法遮盖除dialog以外的地方
<html><head><linkrel="stylesheet"type="text/css"href="css/jquery.ui.all.css"><scriptt...
<html>
<head>
<link rel="stylesheet" type="text/css" href="css/jquery.ui.all.css">
<script type="text/javascript" src="js/jquery-1.8.3.js"></script>
<script type="text/javascript" src="js/jquery-ui.js"></script>
<script type="text/javascript">
$(document).ready(function() {
/*创建对象*/
$( "#dialog" ).dialog({
autoOpen: false,
height: 300,
width: 350,
modal: true,
title:"请登录",
});
/*执行动作*/
$( "#opener" ).click(function() {
$( "#dialog" ).dialog( "open" );
return false;
});
});
</script>
<style>
.login{
display: none;
}
</style>
</head>
<body>
<input type="button" id="opener" value="Open dialog"/>
<div id="dialog" class="login">
<form >
username:<input type="text" name="username"/><br>
password:<input type="password" name="password"/><br>
<input type="submit" value="SUBMIT"/>
</form>
</div>
</body>
</html> 展开
<head>
<link rel="stylesheet" type="text/css" href="css/jquery.ui.all.css">
<script type="text/javascript" src="js/jquery-1.8.3.js"></script>
<script type="text/javascript" src="js/jquery-ui.js"></script>
<script type="text/javascript">
$(document).ready(function() {
/*创建对象*/
$( "#dialog" ).dialog({
autoOpen: false,
height: 300,
width: 350,
modal: true,
title:"请登录",
});
/*执行动作*/
$( "#opener" ).click(function() {
$( "#dialog" ).dialog( "open" );
return false;
});
});
</script>
<style>
.login{
display: none;
}
</style>
</head>
<body>
<input type="button" id="opener" value="Open dialog"/>
<div id="dialog" class="login">
<form >
username:<input type="text" name="username"/><br>
password:<input type="password" name="password"/><br>
<input type="submit" value="SUBMIT"/>
</form>
</div>
</body>
</html> 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询