About the provincial and municipal two-level linkage garbled problem! Urgent!!! Online, etc.
Using Php+mysql+jquery to complete similar provinces and cities two-level linkage problem, that is, the college has different classes, the function has been completed is the choice of college after the selection of the class is garbled, changed a lot of coding type, separate test class page is normal, please what is the problem?
PHP Code
Please select Class
$v) { $v [' class_name ']=iconv (' utf-8 ', ' GBK ', $v [' class_name ']); > ' >
This is the page of the Class!!!
------Solution--------------------
"Restart again or the original code is normal", the browser cache
You need to remove the cache header in the PHP output
------Solution--------------------
Try to keep the file itself encoded, database, page output content encoded, consistent. There is no problem with garbled characters.
------Solution--------------------
Function: 20.function changelocation (LocationID)
21.{
22.document.myform.ctype.length = 0;
23.var Locationidlocationid=locationid;
24.var i;
25.for (I=0;i < onecount; i++)
26.{
27.if (subcat[i][2] = = LocationID)
28.{
29.//var newnewoption1=new Option (Subcat[i]
[1], subcat[i][0]);
30.//document.all.ctype.add (NewOption1);
31.document.myform.ctype.options[document.
Myform.ctype.length] = new Option (subcat
I [1], subcat[i][0]);
32.}
33.}
34.}
For details, please refer to: HTTP://WWW.PHPNEWER.COM/INDEX.PHP/YMGX/DETAIL/ID/30