Home Backend Development PHP Tutorial How to call this JS? _PHP Tutorial

How to call this JS? _PHP Tutorial

Jul 13, 2016 am 10:51 AM
and city how destination Group menu transfer this




How to call this JS?

As shown in the picture, there are two sets of cascading menus for cities across the country: "Departure" and "Destination",
The cascading menu of cities across the country is made into a js file: city.js,
I currently successfully call the city.js file in the cascading menu of the "Departure" group, but failed to call city.js in the cascading menu of the "Destination" group,
May I ask how experts solve this problem?
Thanks! ~! ~


The form code is as follows:
form id="form1" name="search" method="post" action="">

Departure point:


Destination:












[ ]

Let me answer

Attachment: Your user group cannot download or view attachments


D8888D reply content------------------------------------------------- ----------
Thanks for your advice! ~
Please! ~

D8888D reply content------------------------------------------------- ----------
To all the heroes and heroes from all walks of life, please leave your comments as you pass by in a hurry. Thank you! ~! ~

D8888D reply content------------------------------------------------- ----------
I have to sigh deeply, no expert has given me a suggestive reply for two days,
Really disappointed! ~! ~

D8888D reply content------------------------------------------------- ----------
This is the first time I see someone who only posted pictures but no code - -!

D8888D reply content------------------------------------------------- ----------
OK, I'll post the code! ~! ~

D8888D reply content------------------------------------------------- ----------
I want to help you...but I'm a newbie...I really can't help you[img]http://www.111cn.cn/bbs/images/smilies/default/sad.gif[/img]

D8888D reply content------------------------------------------------- ----------
Code like yours may make everyone dizzy, but I have a piece of code that should be more practical. It has high portability. You can refer to it. It is also better maintained and supports unlimited classification: [url=http://yuepin.com /Explore/city.php] The link is marked http://yuepin.com/Explore/city.php[/url]. If you have any questions, you can ask them
I uploaded the file for sharing. Because it is fully JS output, you can also save the page

[ ]
Attachment: Your user group cannot download or view attachments
D8888D reply content------------------------------------------------- ----------
In fact, the implementation is very simple and can be done with ajax. The following technologies are mainly used:
select's ID.options.add(new Option("text",value));

D8888D reply content------------------------------------------------- ----------
Two identical IDs are both s1, which is the reason for failure. I want to help you change it, but this ID is defined, hoho....

Reorganize your object IDs. Too confusing.





Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot Article Tags

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Windows 11: The easy way to import and export start layouts Windows 11: The easy way to import and export start layouts Aug 22, 2023 am 10:13 AM

Windows 11: The easy way to import and export start layouts

How to Default 'Show More Options' in Windows 11's Right-Click Menu How to Default 'Show More Options' in Windows 11's Right-Click Menu Jul 10, 2023 pm 12:33 PM

How to Default 'Show More Options' in Windows 11's Right-Click Menu

How to use Python to call Baidu Map API to implement geographical location query function? How to use Python to call Baidu Map API to implement geographical location query function? Jul 31, 2023 pm 03:01 PM

How to use Python to call Baidu Map API to implement geographical location query function?

Source code exploration: How are objects called in Python? Source code exploration: How are objects called in Python? May 11, 2023 am 11:46 AM

Source code exploration: How are objects called in Python?

ASUS motherboard options compatible with R55600 (including R55600u and 5600h) ASUS motherboard options compatible with R55600 (including R55600u and 5600h) Jan 02, 2024 pm 05:32 PM

ASUS motherboard options compatible with R55600 (including R55600u and 5600h)

Which one is better, Celeron g4900 or i36100? (Which one is better, Celeron g4900 or i34170?) Which one is better, Celeron g4900 or i36100? (Which one is better, Celeron g4900 or i34170?) Jan 01, 2024 pm 06:01 PM

Which one is better, Celeron g4900 or i36100? (Which one is better, Celeron g4900 or i34170?)

How to edit messages on iPhone How to edit messages on iPhone Dec 18, 2023 pm 02:13 PM

How to edit messages on iPhone

PHP camera calling skills: How to implement multi-camera switching PHP camera calling skills: How to implement multi-camera switching Aug 04, 2023 pm 07:07 PM

PHP camera calling skills: How to implement multi-camera switching

See all articles