Secondary association of disease categories in simple medical projects

Source: Internet
Author: User

A very simple second-level linkage of a medical project. The main js Code is as follows: [javascript] <script type = "text/javascript">/** description: JS Disease Association * Time: 2/9/8 * Author: Macro Ying * Call: bar * var areaMap1 = new AreaMap1 ('propine1', 'city1 '); * areaMap1.province ('select a department ', 'select disease '); ** <select id = "province1" onchange = "areaMap1.city (this. value); "> </select> * <select id =" city1 "> </select> */var AreaMap1 = function (provinceid, cityid) {var cityid = cityid; var Provinceid = provinceid; var cityname; var provincename; var map = new Array (10); map [0] = new comefrom ("select Department", "select disease "); map [1] = new comefrom ("Internal Medicine ", "gout | cholecystitis | intestinal obstruction | leukemia | shock | anemia | allergic disease | hyperthyroidism | confluence | poisoning | heart disease | influenza | chronic bronchitis | radiation pneumonia | hyperthyroidism | heart valve disease | myocardial infarction | congenital heart disease | arrhythmia | high blood fat | Coronary Heart Disease | hypertension | pancreatitis | intestinal tuberculosis | emphysema | bronchitis | pneumonia | tuberculosis | asthma | cold "); map [2] = new comefrom ("surgery ", "enteritis | hydrocephalus | tetanus | burn | intestinal tuberculosis | rectal prolapse | anal wart | anal eczema | anal abscess | appendicitis | colon polyp | enteritis | anal fissure | anal fistula | hemorrhoids | constipation "); map [3] = new comefr Om ("male", "cryptorchitis | nocturnal emission | premature ejaculation | impotence | prostate hyperplasia | prostatitis"); map [4] = new comefrom ("obstetrics and gynecology ", "cervical cancer | cervical polyp | cervical erosion | breast hyperplasia | breast cancer | urethritis | accessory inflammation | cervicitis pelvic inflammatory disease | vaginitis | endometriosis"); map [5] = new comefrom ("pediatrics ", "Cough | Kawasaki disease | pediatric cold | infant diarrhea | pediatric asthma | pediatric ADHD | pediatric anorexia"); map [6] = new comefrom ("wuguanke ", "xuanyan | farsighted | stuttering | mouth inflammation | astigmatism | red eye disease | pharyngitis | vocal cords polyp | tonsillitis | laryngeal inflammation | rhinitis | nasal cyst | sinusitis | nasal polyps | otitis media | external ear inflammation | deafness | tinnitus | pulp inflammation | oral ulcer | dental caries | orthodontics | trachoma | oblique amblyopia | myopia | glaucoma | cataract "); map [7] = new comefrom ("dermatology and sexually transmitted diseases ", "sweating | hemorrhoids | acne | AIDS | urethritis | sualentomy | condyloma acuminata | herpes | non-flushed | male | gonorrhea | syphilis | body odor | Herpes Zoster | Mao Yanyan | hemorrhoids | color spots | ichthyosis | vitiligo | white hair | hair loss | urticaria | eczema | dermatitis | Psoriasis "); map [8] = new comefrom (" oncology ", "pituitary tumor | colorectal cancer | skin cancer | carcinoma | gallbladder cancer | esophageal cancer | testicular tumor | ureter tumor | bladder tumor | malignant lymphoma | Acute Leukemia | glioma | lung cancer | brain tumor | bone cancer | nasopharyngeal cancer | pancreatic cancer | thyroid cancer "); map [9] = new comefrom (" ", "Insomnia | paranoia | cerebral infarction | migraine | cerebral hemorrhage | epilepsy | Parkinson | neurasthenia | depression | schizophrenia | stroke | Alzheimer's Disease "); map [10] = new comefrom ("diseases ", "typhoid intestinal perforation | organic phosphorus oral drug poisoning | Bite Injury | altitude sickness | heatstroke | poisonous snake bite poisoning | sealed aphrodisiac poisoning | water loss | formic acid oral drug poisoning | high fever convulsions | acute abdomen | deprecated Chrysanthemum Ester oral medicine" ); function $ (id) {return document. getElementById (I D);} function comefrom (provinces, citys) {this. provinces = provinces; this. citys = citys;} return {province: function (provincename, cityname) {provincename = provincename; cityname = cityname; $ (provinceid ). options. length = 0; for (I = 0; I <map. length; I ++) {$ (provinceid ). options. add (new Option (map [I]. provinces, map [I]. provinces);} if (provincename! = ''& Cityname! = '') {$ (Provinceid ). value = provincename; this. city (provincename); $ (cityid ). value = cityname ;}, city: function (provincename) {$ (cityid ). options. length = 0; for (I = 0; I <map. length; I ++) {if (map [I]. provinces = provincename) {var citys = (map [I]. citys ). split ("|"); for (x = 0; x <citys. length; x ++) {$ (cityid ). options. add (new Option (citys [x], citys [x]) ;}}}</script> the second part of js Code. This is mainly the default value of the drop-down box, initially, "select a department", "select a disease", you can modify [javascript] <script> var areaMap1 = new AreaMap1 ('province1', 'city1 ') as needed '); areaMap1.province ('select a department ', 'select a disease'); // areaMap. province ('internal', 'gout '); </script> Part 3 html code [html] section: <select name = "keshi" id = "province1" onchange = "areaMap1.city (this. value); "> </select> disease: <select name =" jibing "id =" city1 "> </select>

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.