
The function yanzhengClick () {
Var arrs=[];
Var zdmjText=$(" # zdmjText "). Val ();
STR=zdmjText;
Var arrs2=STR. The substring (STR) indexOf (" (") + 1, STR., indexOf (") "));//get the values in the parentheses from page
//1, the value that was obtained from the page (arrs) and the index value of the library, if there is a display correctly, or false
$. Ajax ({
Type: 'get',
Url: '/onemap selectTargetmanagementsNameAndBase. Do,
ContentType: "application/json,"
DataType: "json",
Success: the function (data) {
For (I in data) {//"+ data [I] targetvalueBase +" in brackets behind the value of the
Shuju=data [I] targetName;//database to get the value of the
var count=0;
For (var j=0; J & lt; Shuju. Length; J++) {
Var STRB=shuju [j];
}
If (arrs2==STRB) {//on the opposite side of the values of the page and database
count++;
}
If (count==0) {//if equal to 0 means no value in the database
//alert (" error ")
} else {
//alert (" right ")
}
}
}
})