Merge pull request #738 from midoks/dev

面板关联优化
This commit is contained in:
Mr Chen 2025-05-16 19:08:50 +08:00 committed by GitHub
commit 2e9864be2a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 12 additions and 2 deletions

View File

@ -1227,12 +1227,22 @@ function bindPanel(a,type,ip,btid,url,user,pw){
var str =$(this).val();
var isip = /([\w-]+\.){2,6}\w+/;
var iptext = str.match(isip);
if(iptext) $("#bttitle").val(iptext[0]);
if(iptext) {
var bttitle_val = $("#bttitle").val();
if (bttitle_val == '') {
$("#bttitle").val(iptext[0]);
}
}
}).blur(function(){
var str =$(this).val();
var isip = /([\w-]+\.){2,6}\w+/;
var iptext = str.match(isip);
if(iptext) $("#bttitle").val(iptext[0]);
if(iptext) {
var bttitle_val = $("#bttitle").val();
if (bttitle_val == '') {
$("#bttitle").val(iptext[0]);
}
}
});
}
});