Home Web Front-end JS Tutorial Problems with the method of obtaining form elements under javascript_form effects

Problems with the method of obtaining form elements under javascript_form effects

May 16, 2016 pm 06:35 PM
Get method form elements

1. Test environment
Browser: IE6, FF 3.5.5, Opera 10, Chrome 4.0.249, Safari 4.0.3

2. Example
Copy code The code is as follows:






Three. Solution (the method I think of is to change the acquisition method, based on YUI) >
Copy code The code is as follows:



document.formname.inputname

I have encountered this problem once before, but I forgot it again this time and made a mistake again, so I must record it.

Look at this example:



Copy the code The code is as follows: < ;form name="hehe">





< script type="text/javascript">
document.write(document.hehe.haha.length);
document.write('
');
document.write( document.hehe2.haha.length);



Demo



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 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

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

Hot Tools

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)

A must-read for Java developers: How to obtain administrative district boundary data for administrative division query on Amap A must-read for Java developers: How to obtain administrative district boundary data for administrative division query on Amap Jul 31, 2023 pm 09:05 PM

A must-read for Java developers: How to obtain administrative district boundary data for Administrative Division query on Amap. In the development of geographic information systems (GIS), obtaining administrative division data is a common requirement. When using Amap as a geographical information data source, we can obtain the boundary data of specific administrative regions through the administrative division query interface of Amap. This article will introduce to Java developers how to use the administrative division query interface of Amap to obtain administrative district boundary data. Before we start, we need to apply for an AutoNavi developer account and obtain

How to get HTTP status code in JavaScript the easy way How to get HTTP status code in JavaScript the easy way Jan 05, 2024 pm 01:37 PM

Introduction to the method of obtaining HTTP status code in JavaScript: In front-end development, we often need to deal with the interaction with the back-end interface, and HTTP status code is a very important part of it. Understanding and obtaining HTTP status codes helps us better handle the data returned by the interface. This article will introduce how to use JavaScript to obtain HTTP status codes and provide specific code examples. 1. What is HTTP status code? HTTP status code means that when the browser initiates a request to the server, the service

PHP regular expression: How to match all form elements with name attribute in HTML PHP regular expression: How to match all form elements with name attribute in HTML Jun 22, 2023 am 10:17 AM

When writing PHP programs, you often need to use regular expressions to process text. In web development, it is often necessary to extract specific information from HTML. This article will introduce how to use PHP regular expressions to match all form elements with the name attribute in HTML. HTML form elements are the core components in web forms, including text boxes, check boxes, radio buttons, drop-down lists, etc. In web applications, form elements often use name

Ways to obtain qualifications for the Ming Tide Sonata Test Ways to obtain qualifications for the Ming Tide Sonata Test Jan 23, 2024 pm 10:42 PM

Want to be the first to experience the highly anticipated new game "Song of the Waves"? As a loyal Double Pamish player, you must not miss this opportunity to apply for test qualifications. Next, let me tell you how to apply for the test qualification of Mingchao Sonata. How to obtain qualifications for the Sonata Test: You need to complete the Sonata Test Recruitment Questionnaire and submit it successfully. After the recruitment deadline, some drifters will be selected and given test qualifications. 1. Recruitment time Start time: 11:00 on January 18, 2024 End time: 18:00 on February 7, 2024 2. Test information Test platform: PC, Android, iOS Test type: Limited billing deletion test test Time: The official start time and end time will be notified separately, please pay attention to the official follow-up announcement. 3. Obtaining qualifications 1. First of all, I

Introduction to how to obtain the Fantasy Tower Scavenging Snail and its location Introduction to how to obtain the Fantasy Tower Scavenging Snail and its location Mar 29, 2024 am 08:16 AM

Scavenging snails are a material that belongs to meat in the Fantasy Tower game. Finding the materials is relatively simple, but many friends don’t know the specific location of scavenging snails. The editor briefly summarized it for those who are interested. Friends can join the editor to take a look at how to obtain the Fantasy Tower Scavenging Snail and introduce its location. --How to get the Fantasy Tower Scavenger Snail. Introduction to the location of the Fantasy Tower Scavenger Snail. There is a teleportation point on the top side of Navia. There are many scavenger snails nearby, as shown in the picture below. The number that refreshes in a small ravine or by the river is very good. of.

How to use form elements with Twig template engine in PHPixie framework? How to use form elements with Twig template engine in PHPixie framework? Jun 03, 2023 am 08:41 AM

With the increase in modern web applications, the PHPixie framework has become an excellent choice to develop reliable web applications quickly. The Twig template engine is a powerful tool in the PHPixie framework, which allows developers to handle views and templates in the simplest way. In this article, we will show how to use the Twig template engine to handle almost every element in a form. We will explain what the Twig template engine is, how to use it and how to build almost all form elements and implementations on top of it.

How to obtain Hulu through Huluxia APP How to obtain Hulu through Huluxia APP Mar 19, 2024 pm 08:10 PM

How to get gourds in Huluxia APP? Calabash Man is a popular mobile game community platform software. Players can download games on the platform, use game assistants, and discuss game information and strategies. Calabash is a currency of the platform. Here is how to obtain Calabash. It helps everyone. Participate in various activities in the community, use the community function of the platform to enter relevant game sections, browse various activity information, and complete the corresponding requirements to obtain gourds. Taking up a position in a game section, such as a moderator or administrator, allows you to provide services to players in return for Hulu. Posting popular posts in the community section can get extra Hulu rewards, and posts that are enhanced will have more Hulu rewards.

How to get win11 preview internal beta version How to get win11 preview internal beta version Dec 29, 2023 pm 07:59 PM

After the win11 system was leaked, it has now provided you with a preview internal beta version. However, there are still many users who don’t know how to update. So here is how to get the win11 preview internal beta version. If you don’t know how to get it, Come and learn. How to get the win11 preview internal beta version: 1. First go to the registry editor and open the path: Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsSelfHost\UI\Selection. 2. Right-click in the blank space on the right and select New String Value. A total of 5 new string values ​​need to be created and named: UIBranch key value and modified to Dev. Content

See all articles