search
HomeBackend DevelopmentPHP TutorialHow to call this JS? _PHP Tutorial
How to call this JS? _PHP TutorialJul 13, 2016 am 10:51 AM
andcityhowdestinationGroupmenutransferthis




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
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
如何使用Python调用百度地图API实现地理位置查询功能?如何使用Python调用百度地图API实现地理位置查询功能?Jul 31, 2023 pm 03:01 PM

如何使用Python调用百度地图API实现地理位置查询功能?随着互联网的发展,地理位置信息的获取和利用越来越重要。百度地图是一款非常常见和实用的地图应用,它提供了丰富的地理位置查询服务。本文将介绍如何使用Python调用百度地图API实现地理位置查询功能,并附上代码示例。申请百度地图开发者账号和应用首先,你需要拥有一个百度地图开发者账号,并创建一个应用。登录

源码探秘:Python 中对象是如何被调用的?源码探秘:Python 中对象是如何被调用的?May 11, 2023 am 11:46 AM

楔子我们知道对象被创建,主要有两种方式,一种是通过Python/CAPI,另一种是通过调用类型对象。对于内置类型的实例对象而言,这两种方式都是支持的,比如列表,我们即可以通过[]创建,也可以通过list(),前者是Python/CAPI,后者是调用类型对象。但对于自定义类的实例对象而言,我们只能通过调用类型对象的方式来创建。而一个对象如果可以被调用,那么这个对象就是callable,否则就不是callable。而决定一个对象是不是callable,就取决于其对应的类型对象中是否定义了某个方法。如

PHP摄像头调用技巧:如何实现多摄像头切换PHP摄像头调用技巧:如何实现多摄像头切换Aug 04, 2023 pm 07:07 PM

PHP摄像头调用技巧:如何实现多摄像头切换摄像头应用已经成为许多Web应用的重要组成部分,例如视频会议、实时监控等等。在PHP中,我们可以使用各种技术来实现对摄像头的调用和操作。本文将重点介绍如何实现多摄像头的切换,并提供一些示例代码来帮助读者更好地理解。摄像头调用基础在PHP中,我们可以通过调用JavaScript的API来实现摄像头的调用。具体来说,我们

如何解决PHP开发中的外部资源访问和调用如何解决PHP开发中的外部资源访问和调用Oct 08, 2023 am 11:01 AM

如何解决PHP开发中的外部资源访问和调用,需要具体代码示例在PHP开发中,我们经常会遇到需要访问和调用外部资源的情况,比如API接口、第三方库或者其他服务器资源。在处理这些外部资源时,我们需要考虑如何进行安全的访问和调用,同时保证性能和可靠性。本文将介绍几种常见的解决方案,并提供相应的代码示例。一、使用curl库进行外部资源调用curl是一个非常强大的开源库

matlab如何调用m文件-matlab调用m文件的方法matlab如何调用m文件-matlab调用m文件的方法Mar 04, 2024 pm 01:49 PM

有很多朋友还不知道matlab如何调用m文件,所以下面小编就讲解了matlab调用m文件的方法,有需要的小伙伴赶紧来看一下吧,相信对大家一定会有所帮助哦。1、首先打开matlab软件,在主界面中点击“打开”,如下图所示。2、然后选择一个需要打开的m文件,选择打开,如下图所示。3、接着在编辑器中看m文件的文件名和变量数目,如下图所示。4、可以在命令行中输入m文件名后括号加变量值,就可以调用,如下图所示。5、最后就可以成功调用m文件,如下图所示。上面就是小编为大家带来的matlab如何调用m文件的全

如何通过Python编程调用百度地图API实现地图展示功能?如何通过Python编程调用百度地图API实现地图展示功能?Aug 02, 2023 pm 08:27 PM

如何通过Python编程调用百度地图API实现地图展示功能?随着互联网的快速发展,地图应用成为了我们生活中不可或缺的一部分。而百度地图作为国内最大的地图应用之一,为我们提供了丰富的服务和API接口,可以很方便地实现地图展示功能。本文将介绍如何通过Python编程调用百度地图API来实现地图展示功能,并给出相应的代码示例。首先,我们需要在百度开放平台上注册一个

如何使用Java调用WebService如何使用Java调用WebServiceDec 29, 2023 pm 02:32 PM

使用Java调用WebService的方法步骤,需要具体代码示例Web服务是一种基于Web的应用程序接口,通过网络提供各种功能。在Java开发中,我们经常需要使用Web服务来实现与其他系统的交互。本篇文章将介绍如何使用Java调用WebService,并提供具体的代码示例。一、了解WebServiceWebService是一种标准化的通信协议,使用XML格式

魔改「黑神话悟空」,打败 Midjourney,这个 AI 生图神器让人上头魔改「黑神话悟空」,打败 Midjourney,这个 AI 生图神器让人上头Aug 23, 2024 pm 09:42 PM

当AI文生图比拼真实度、艺术感,Ideogram开辟了一个刁钻的赛道:在图片上精准生成文字,并且字体和排版都好看。这个需求并不小众,一键生成海报、插画,还不用P图,能够省不少事,很适合对设计一窍不通的普通人。我们之前写过Ideogram的1.0版本。8月21日,2.0版本来了,真实感更好了,海报更有设计感了,文字这个看家本领也更强了。你或许从来没有听说过它,这是一款前Google员工开发的AI产品,缺点不少,但长板能「弯道超车」Midjourney。指路https://ideogram.ai/A

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

DVWA

DVWA

Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

Atom editor mac version download

Atom editor mac version download

The most popular open source editor

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool

SecLists

SecLists

SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.