当前位置:网站首页>Traversal and branch judgment of JS (case on June 24, 2022)
Traversal and branch judgment of JS (case on June 24, 2022)
2022-06-25 15:40:00 【Fairy-KunKun】
/*
Time :2022 year 6 month 24 Japan
author :FairyKunKun
*/
var gridData = s_detail1Obj.getData ();
var sum3 = 0;//sum3 It is used to record that the document number starts with 3 The total number of the order No
var sum4 = 0;//sum4 It is used to record that the document number starts with 4 The total number of the order No
if ( gridData.length > 0 ) { // Traverse all data and count all forms 3、4 Total at the beginning
for ( i = 0 ; i < gridData.length ; i ++ ) {
if ( gridData[ i ].inbb001.substr ( 0 , 1 ) == "3" ) {
//alert(gridData[i].inbb001.substr(0,1));
sum3 ++;
} else {
//alert(gridData[i].inbb001.substr(0,1));
sum4 ++;
}
}
}
if ( sum3 > 0 && sum4 === 0 ) { // If only the form starts with 3 Of
document.getElementById ( "sptj001" ).value = "3";
// Assign a value to the target table box “3”
} else if ( sum4 > 0 && sum3 === 0 ) { // If only the form starts with 4 Of
document.getElementById ( "sptj001" ).value = "4";
// Assign a value to the target table box “4”
} else {
document.getElementById ( "sptj001" ).value = "5";
// In other cases “5”
}
边栏推荐
- Could not connect to redis at 127.0.0.1:6379 in Windows
- 5 connection modes of QT signal slot
- Sword finger offer 04 Find in 2D array
- Sword finger offer II 091 Paint the house
- Sword finger offer 03 Duplicate number in array
- Esp8266 building smart home system
- The situation and suggestions of a software engineering associate graduate who failed in the postgraduate entrance examination
- Learning to Measure Changes: Fully Convolutional Siamese Metric Networks for Scene Change Detection
- Sword finger offer 07 Rebuild binary tree
- For the first time in Chinese universities! Unique in the world! Tongji students win international awards
猜你喜欢

5 connection modes of QT signal slot

Yolov5 Lite: fewer parameters, higher accuracy and faster detection speed

Binocular 3D perception (I): preliminary understanding of binocular

Afterword of Parl intensive learning 7-day punch in camp

剑指 Offer 03. 数组中重复的数字

Globally unique key generation strategy - implementation principle of the sender
![[paper notes] rethinking and improving relative position encoding for vision transformer](/img/6b/8b1c192e0ce715789465fa9ccaabfc.jpg)
[paper notes] rethinking and improving relative position encoding for vision transformer
Desktop development (Tauri) opens the first chapter

剑指 Offer II 091. 粉刷房子

TFIDF与BM25
随机推荐
Arthas, a sharp tool for online diagnosis - several important commands
Sword finger offer 06 Print linked list from end to end
Globally unique key generation strategy - implementation principle of the sender
MySQL modifier l'instruction de champ
Kali SSH Remote Login
基于深度Q学习的雅达利打砖块游戏博弈
After the project is pushed to the remote warehouse, Baota webhook automatically publishes it
Lombok common notes
Efficient pytorch: how to eliminate training bottlenecks
0706-- replace fields in the use case, such as mobile phone number or ID
Postman usage notes, interface framework notes
Internal class learning notes
Highly concurrent optimized Lua + openresty+redis +mysql (multi-level cache implementation) + current limit +canal synchronization solution
Is it safe to open a stock account through the account opening link given by the account manager? I want to open an account
Several relationships of UML
数据类型的内置方法
Core mode and immediate rendering mode of OpenGL
Several solutions to the distributed lock problem in partial Internet companies
Pytorch distributed test pit summary
MySQL transaction characteristics and implementation principle