In the app run, the following bug has happened, please ask how to add the Mui.ajax back to the Web page
uncaught typeerror:property ' data ' of object function (B,c) {if (c=c| | A,!B) return J (); if ("Object" ==typeof B) return i.isarraylike (b)? J (I.slice.call (b), NULL): J ([B],null); if ("function" = = typeof b) return I.ready (b); if ("string" ==typeof B) try{if (B=b.trim () ... ... on index2.html:38
function Showhint (str) {
if (Str.length = = 0) {
document.getElementById ("Txthint"). InnerHTML = "";
Return
} else {
var url = ' http://hktc.erufa.com/show.php '
Mui.ajax (url,{
data:{
Q:str
},
DataType: ' HTML ',
Type: ' Get ',//http request type
timeout:30000,//timeout time is set to 10 seconds;
Success:function (data) {
The server returns the response and, based on the response results, analyzes whether the login was successful;
document.getElementById ("Txthint"). InnerHTML = data;
},
Error:function (Xhr,type,errorthrown) {
exception handling;
Console.log (type);
}
});
Start typing a name in the input field below:
Suggestions:
PHP code
Header ("access-control-allow-origin:*");
Header ("content-type:text/html; Charset=utf-8 ");
$a [] = "Anna";
$a [] = "Brittany";
$a [] = "Cinderella";
$a [] = "Diana";
$a [] = "Eva";
$a [] = "Fiona";
$a [] = "Gunda";
$a [] = "Hege";
$a [] = "Inga";
$a [] = "Johanna";
$a [] = "Kitty";
$a [] = "Linda";
$a [] = "Nina";
$a [] = "Ophelia";
$a [] = "Petunia";
$a [] = "Amanda";
$a [] = "Raquel";
$a [] = "Cindy";
$a [] = "Doris";
$a [] = "Eve";
$a [] = "Evita";
$a [] = "Sunniva";
$a [] = "Tove";
$a [] = "Unni";
$a [] = "Violet";
$a [] = "Liza";
$a [] = "Elizabeth";
$a [] = "Ellen";
$a [] = "Wenche";
$a [] = "Vicky";
Get the Q parameter from URL
$q = $_request["Q"];
$hint = "";
Lookup all hints from array if $q are different from ""
if ($q!== "") {
$q = strtolower($q);$len=strlen($q);foreach($a as $name) { if (stristr($q, substr($name, 0, $len))) { if ($hint === "") { $hint = $name; } else { $hint .= ", $name"; } }}
}
Output "no suggestion" if no hint was found or output correct values
echo $hint = = = = ""? " No suggestion ": $hint;
?>
Reply content:
In the app run, the following bug has happened, please ask how to add the Mui.ajax back to the Web page
uncaught typeerror:property ' data ' of object function (B,c) {if (c=c| | A,!B) return J (); if ("Object" ==typeof B) return i.isarraylike (b)? J (I.slice.call (b), NULL): J ([B],null); if ("function" = = typeof b) return I.ready (b); if ("string" ==typeof B) try{if (B=b.trim () ... ... on index2.html:38
function Showhint (str) {
if (Str.length = = 0) {
document.getElementById ("Txthint"). InnerHTML = "";
Return
} else {
var url = ' http://hktc.erufa.com/show.php '
Mui.ajax (url,{
data:{
Q:str
},
DataType: ' HTML ',
Type: ' Get ',//http request type
timeout:30000,//timeout time is set to 10 seconds;
Success:function (data) {
The server returns the response and, based on the response results, analyzes whether the login was successful;
document.getElementById ("Txthint"). InnerHTML = data;
},
Error:function (Xhr,type,errorthrown) {
exception handling;
Console.log (type);
}
});
Start typing a name in the input field below:
Suggestions:
PHP code
Header ("access-control-allow-origin:*");
Header ("content-type:text/html; Charset=utf-8 ");
$a [] = "Anna";
$a [] = "Brittany";
$a [] = "Cinderella";
$a [] = "Diana";
$a [] = "Eva";
$a [] = "Fiona";
$a [] = "Gunda";
$a [] = "Hege";
$a [] = "Inga";
$a [] = "Johanna";
$a [] = "Kitty";
$a [] = "Linda";
$a [] = "Nina";
$a [] = "Ophelia";
$a [] = "Petunia";
$a [] = "Amanda";
$a [] = "Raquel";
$a [] = "Cindy";
$a [] = "Doris";
$a [] = "Eve";
$a [] = "Evita";
$a [] = "Sunniva";
$a [] = "Tove";
$a [] = "Unni";
$a [] = "Violet";
$a [] = "Liza";
$a [] = "Elizabeth";
$a [] = "Ellen";
$a [] = "Wenche";
$a [] = "Vicky";
Get the Q parameter from URL
$q = $_request["Q"];
$hint = "";
Lookup all hints from array if $q are different from ""
if ($q!== "") {
$q = strtolower($q);$len=strlen($q);foreach($a as $name) { if (stristr($q, substr($name, 0, $len))) { if ($hint === "") { $hint = $name; } else { $hint .= ", $name"; } }}
}
Output "no suggestion" if no hint was found or output correct values
echo $hint = = = = ""? " No suggestion ": $hint;
?>