代码:
// 搜索
$("#searchButton").click(function() {
var ip = $("#searchIp").val().trim();
if (ip.length == 0) {
ip = '';
}
var typeId = $('#serverType').combobox('getValue');
var templateId = $('#template').combobox('getValue');
loaddata(ip,typeId,templateId);
});
//回车搜索
var ip = $('#searchIp');
ip.textbox('textbox').bind('keydown', function(e){
if (e.keyCode == 13){
ip.textbox('setValue', $(this).val()); //赋值
$('#searchButton').trigger('click');
}
});