Javascript JQuery覆盖不更改无线电选择
我试过了,但用的是单选按钮。因此,页面加载后,我可以进行选择,但不能将选择更改为其他选项。我的代码在这里:Javascript JQuery覆盖不更改无线电选择,javascript,jquery,html,radio-button,Javascript,Jquery,Html,Radio Button,我试过了,但用的是单选按钮。因此,页面加载后,我可以进行选择,但不能将选择更改为其他选项。我的代码在这里: <!DOCTYPE html> <html> <head> <title>jQuery Tools standalone demo</title> <!-- include the Tools --> <script src="http://cdn.jquerytools.org/1
<!DOCTYPE html>
<html>
<head>
<title>jQuery Tools standalone demo</title>
<!-- include the Tools -->
<script src="http://cdn.jquerytools.org/1.2.7/full/jquery.tools.min.js"></script>
<style>
.modal {
background-color:#fff;
display:none;
width:350px;
padding:15px;
text-align:left;
border:2px solid #333;
opacity:0.8;
-moz-border-radius:6px;
-webkit-border-radius:6px;
-moz-box-shadow: 0 0 50px #ccc;
-webkit-box-shadow: 0 0 50px #ccc;
}
.modal h2 {
margin:0px;
padding:10px 0 10px 45px;
border-bottom:1px solid #333;
font-size:20px;
}
</style>
</head>
<body><!-- the triggers -->
<p>
<input type="radio" name="group1" value="Milk" class="modalInput" rel="#yesno"> Milk<br>
<input type="radio" name="group1" value="Butter" class="modalInput" rel="#yesno"> Butter<br>
<input type="radio" name="group1" value="Cheese" class="modalInput" rel="#yesno"> Cheese
</p>
<!-- yes/no dialog -->
<div class="modal" id="yesno">
<h2>This is a modal dialog</h2>
<p>
You can only interact with elements that are inside this dialog.
To close it click a button or use the ESC key.
</p>
<!-- yes/no buttons -->
<p>
<button class="close"> Yes </button>
<button class="close"> No </button>
</p>
</div>
<!-- user input dialog -->
<div class="modal" id="prompt">
<h2>This is a modal dialog</h2>
<p>
You can only interact with elements that are inside this dialog.
To close it click a button or use the ESC key.
</p>
<!-- input form. you can press enter too -->
<form>
<input />
<button type="submit"> OK </button>
<button type="button" class="close"> Cancel </button>
</form>
<br />
</div>
<script>
$(document).ready(function() {
var triggers = $(".modalInput").overlay({
// some mask tweaks suitable for modal dialogs
mask: {
color: '#ebecff',
loadSpeed: 200,
opacity: 0.9
},
closeOnClick: false
});
});
</script>
</body>
</html>
jQuery工具独立演示
.莫代尔{
背景色:#fff;
显示:无;
宽度:350px;
填充:15px;
文本对齐:左对齐;
边框:2倍实心#333;
不透明度:0.8;
-moz边界半径:6px;
-webkit边界半径:6px;
-moz盒阴影:0 50px#ccc;
-网络工具包盒阴影:0 50px#ccc;
}
.模态h2{
边际:0px;
填充:10px 0 10px 45px;
边框底部:1px实心#333;
字体大小:20px;
}
牛奶
黄油
奶酪
这是一个模态对话框
只能与此对话框内的元素交互。
要关闭它,请单击按钮或使用ESC键。
对
不
这是一个模态对话框
只能与此对话框内的元素交互。
要关闭它,请单击按钮或使用ESC键。
好啊
取消
$(文档).ready(函数(){
var触发器=$(“.modalInput”).overlay({
//一些适合模态对话框的掩码调整
遮罩:{
颜色:“#ebecff”,
装载速度:200,
不透明度:0.9
},
closeOnClick:false
});
});
如果这是一个简单的问题,请原谅,我对JQuery比较陌生
谢谢你的帮助 试试这个-
令人惊叹的!它工作得很好。非常感谢您抽出时间。
$(document).ready(function() {
var triggers = $(".modalInput").overlay({
mask: {
color: '#ebecff',
loadSpeed: 200,
opacity: 0.9
},
closeOnClick: false,
onClose: function() {
this.getTrigger().prop('checked', true);
}
});
});