Home Web Front-end JS Tutorial js gets the background fields and changes the selected status of the checkbox code_javascript skills

js gets the background fields and changes the selected status of the checkbox code_javascript skills

May 16, 2016 pm 05:32 PM
state selected

Copy code The code is as follows:

Whether it is a subcontractor



  Whether it is the general contractor


  

zbr = ("Y".equals(String.valueOf(map.get("ylzd11"))))?"1":"0";////Is it the general contractor

fbr = ("Y".equals(String.valueOf(map.get("ylzd12"))))?"1":"0";//Whether it is a subcontractor
return "jzysuccess";

function init(){

//The payer type code of the general invoice 1 represents the unit 0 represents the individual

if($("#fkfLxDm").val()=='1'){
$('input[type=radio][value=1]')[0].checked = true;
}else if ($("#fkfLxDm").val()=='0'){
$('input[type=radio][value=0]')[0].checked = true;
}

//Construction industry unified invoice Whether you are the general contractor
if($("#zbr").val()=='1'){
// zbr The ID of the general contractor must be accurate and unique
$("#zbr1")[0].value = true;
alert($("#zbr" ).val());
$('input[type=checkbox][value=true]')[0].checked =true;
alert($("#fbr").val() );
}else {
$("#zbr")[0].value = false;
$('input[type=checkbox][value=false]')[0].checked ==false;
}
//Construction industry unified invoice Whether it is a subcontractor
alert($("#fbr").val());
if($("#fbr ").val()=='1'){
// fbr subcontractor id must be accurate and unique
$ ("#fbr1")[0].value = true;
$('input[type=checkbox][value=true]')[1].checked =true;

}else {
$("#fbr")[0].value = false;
$('input[type=checkbox][value=false]')[1].checked =false;
}
}

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

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
4 weeks 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)

Connection status in standby: Disconnected, reason: NIC Compliance Connection status in standby: Disconnected, reason: NIC Compliance Feb 19, 2024 pm 03:15 PM

"The connection status in the event log message shows Standby: Disconnected due to NIC compliance. This means that the system is in standby mode and the network interface card (NIC) has been disconnected. Although this is usually a network issue , but can also be caused by software and hardware conflicts. In the following discussion, we will explore how to solve this problem." What is the reason for standby connection disconnection? NIC compliance? If you see the "ConnectivityStatusinStandby:DisConnected,Reason:NICCompliance" message in Windows Event Viewer, this indicates that there may be a problem with your NIC or network interface controller. This situation is usually

How to set Momo status How to set Momo status Mar 01, 2024 pm 12:10 PM

Momo, a well-known social platform, provides users with a wealth of functional services for their daily social interactions. On Momo, users can easily share their life status, make friends, chat, etc. Among them, the setting status function allows users to show their current mood and status to others, thereby attracting more people's attention and communication. So how to set your own Momo status? The following will give you a detailed introduction! How to set status on Momo? 1. Open Momo, click More in the lower right corner, find and click Daily Status. 2. Select the status. 3. The setting status will be displayed.

How to show up offline on WhatsApp on Android phone How to show up offline on WhatsApp on Android phone Jul 14, 2023 am 08:21 AM

Want to appear "offline" or don't want to share your current status with your friends on WhatsApp? There is a simple but clever trick to do this. You can adjust your WhatsApp settings so that your current status (offline or last seen) is not visible to your friends or others there. How to show offline status on your WhatsApp status bar? This is a very simple and streamlined process. So, follow the steps below now. Step 1 – Open WhatsApp on your phone. Step 2 – Tap ⋮ and choose to open Settings. Step 3 – Open Privacy settings to access it. Step 4 – On that privacy page, open the “Last Viewed & Online” setting to access it. Step 5 – Change the “Who can

How to check server status How to check server status Oct 09, 2023 am 10:10 AM

Methods to view server status include command line tools, graphical interface tools, monitoring tools, log files, and remote management tools. Detailed introduction: 1. Use command line tools. On Linux or Unix servers, you can use command line tools to view the status of the server; 2. Use graphical interface tools. For server operating systems with graphical interfaces, you can use the graphics provided by the system. Use interface tools to view server status; 3. Use monitoring tools. You can use special monitoring tools to monitor server status in real time, etc.

Detailed explanation of the five states of Java threads and state transition rules Detailed explanation of the five states of Java threads and state transition rules Feb 19, 2024 pm 05:03 PM

In-depth understanding of the five states of Java threads and their conversion rules 1. Introduction to the five states of threads In Java, the life cycle of a thread can be divided into five different states, including new state (NEW), ready state (RUNNABLE), Running status (RUNNING), blocking status (BLOCKED) and termination status (TERMINATED). New state (NEW): When the thread object is created, it is in the new state. At this point, the thread object has allocated enough resources to perform the task

Excellent explanation: Does Dubbo already support Go language? Excellent explanation: Does Dubbo already support Go language? Mar 25, 2024 am 09:42 AM

Dear readers, today we will provide you with an article discussing Dubbo’s Go language. As an excellent distributed service framework, Dubbo has been widely used and supported in the Java language. With the rapid development of Go language in recent years, many developers have become keenly interested in whether Dubbo already supports Go language. This article will elaborate on Dubbo’s support for the Go language, specific implementation methods, and code examples. I hope it can help

Learn about printer offline status Learn about printer offline status Jan 04, 2024 am 10:29 AM

When we see the printer is offline on our computer, sometimes we may not know what it means. In fact, this means that the printer is not connected. What does offline status of the printer mean? Answer: Offline status means that the printer is not connected. The possible reason is that the printer is not turned on or is not connected normally. Solution to printer offline status: Rewrite the content without When changing the original meaning, you need to change the language to Chinese, and the original sentence does not need to appear. 1. First, make sure your printer is turned on normally, if not, turn it on. Use another method: 1. If your printer is already turned on, you can first enter the "Control Panel" and then click the "View Devices and Printers" option. 3. Next, select your printer and click "View what is currently being printed." "most

Introduction and principle analysis of PHP stateless Introduction and principle analysis of PHP stateless Mar 06, 2024 pm 02:57 PM

Introduction and Principle Analysis of PHP Stateless In Web development, statelessness is an important concept. It means that the server does not save any client state information when processing client requests. Each request is independent and Does not depend on previous requests. PHP, as a commonly used server-side scripting language, also supports stateless features. This article will introduce the concept and principles of PHP statelessness, and analyze it through specific code examples. The concept of stateless means that the server does not save any information when processing client requests.

See all articles