我想使用JQuery UI的Tabs实现这个功能,输入SN的值以后, 单击Button, 可以看到查询显示查询结果,请问大家应该如何这个功能?谢谢
<script type ="text/javascript" >
$(function() {
$("#RepairInfo").click(function(event) {
var h = $(this).attr('href');
h = "RepairInfo.aspx?SN=" + $('#txtSN').val();
$(this).attr('href', h);
});
$("#tabs").tabs({
beforeLoad: function(event, ui) {
ui.jqXHR.error(function() {
ui.panel.html(
"Couldn't load this tab. We'll try to fix this as soon as possible. " +
"If this wouldn't be a demo.");
});
}
});
});
</script>
</head>
<body>
<input id="txtSN" name ="txtSN" type="text" />
<input id="btnSubmit" type="button" value="button" />
<div id="tabs">
<ul>
<li><a id="id1" href="#tabs-1">Preloaded</a></li>
<li><a id ="RepairInfo" href="RepairInfo.aspx?SN=" >RMAInfo</a></li>
</ul>
<div id="tabs-1">
</div>
</div>
</body>
</html>
<script type ="text/javascript" >
$(function() {
$("#RepairInfo").click(function(event) {
var h = $(this).attr('href');
h = "RepairInfo.aspx?SN=" + $('#txtSN').val();
$(this).attr('href', h);
});
$("#tabs").tabs({
beforeLoad: function(event, ui) {
ui.jqXHR.error(function() {
ui.panel.html(
"Couldn't load this tab. We'll try to fix this as soon as possible. " +
"If this wouldn't be a demo.");
});
}
});
});
</script>
</head>
<body>
<input id="txtSN" name ="txtSN" type="text" />
<input id="btnSubmit" type="button" value="button" />
<div id="tabs">
<ul>
<li><a id="id1" href="#tabs-1">Preloaded</a></li>
<li><a id ="RepairInfo" href="RepairInfo.aspx?SN=" >RMAInfo</a></li>
</ul>
<div id="tabs-1">
</div>
</div>
</body>
</html>
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货