阅读背景:

基于其他组合框的一个组合框的值 - php

来源:互联网 

i have two tables categories and sub-categories in database. On my form i have two combo boxes category and sub categories. Now i want that when i change category, subcategories should change accordingly. I can do it if arrays are defined in javascript. but in my case subcategories are to load from database on the basis of value of category selected. i can fetch data from database using php. if data is in php array how will i pass it to javascript. how can i solve this problem without ajax? if the solution is JSON then how can i implement json as i never used it.i have two tables categories and sub-categories




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: