function checkip(str) {
var ip = /^((2[0-4]\d|25[0-5]|[01]?\d\d?)\.){3}(2[0-4]\d|25[0-5]|[01]?\d\d?)$/;
if(ip.test(str)) {
return str;
} else {
layer.open({
content: 'this IP address format is incorrect'
,btn: 'YES'
});
} if(strEmail==""){
layer.open({
content: 'this IP address cannot be empty'
,btn: 'YES'
});
}
};