当前位置:网站首页>Object in ES6 Use of entries()
Object in ES6 Use of entries()
2022-06-13 08:47:00 【fengyehongWorld】
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>ES6 in Object.entries() Use </title>
</head>
<body>
Input box 1<input id="ipt1" type="text" >
<br>
Input box 2<input id="ipt2" type="text" >
<br>
Input box 3<input id="ipt3" type="text" >
</body>
<script src="./jquery.min.js"></script>
<script> /* Specific use scenarios 1. When initializing in the input box of the page , A fixed value is required 2. After the search screen input conditions , Jump to the input page with the search conditions , After the input page completes the input and saves, it will take the search jump to jump back to the search screen */ const valueObj = {
ipt1: 'ipt1 Value ', ipt2: 'ipt2 Value ', ipt3: 'ipt3 Value ', } // As soon as you enter the page, assign the prepared data to the input box elements in the page $(function() {
for (const [id, value] of Object.entries(valueObj)) {
console.log(id, value); /* ipt1 ipt1 Value ipt2 ipt2 Value ipt3 ipt3 Value */ console.log("----------"); $(`#${
id}`).val(value); } }); </script>
</html>
边栏推荐
- 1. preliminary understanding of Express
- 3、 JS notes
- 4. Relationship selector (parent-child relationship, ancestor offspring relationship, brother relationship)
- 0. Quelques doutes au sujet de SolidWorks
- 2021-04-16
- VS安装VAssistX插件导致WPF-XAML文件输入中文出现乱码问题解决方案
- [leetcode weekly race record] record of the 80th biweekly race
- Time and date processing in JS
- Namespace in TS (2)
- Gbase 8A v95 vs v86 compression strategy analogy
猜你喜欢
VI editor
Docker installing MySQL local remote connection docker container MySQL
WARNING:tornado.access:404 GET /favicon.ico (172.16.8.1) 1.84ms [附静态文件设置]
MySQL sorts according to the specified order of the specified fields
Vs installation of vassistx plug-in causes Chinese input of wpf-xaml file to be garbled. Solution
0.一些自己初學Solidworks的疑惑
Yarn package management tool
On the use of regular expressions (bracket problem)
[pychart pit stepping record] prompt after configuring remote operation, [errno 2] no such file or directory
DHCP principle and configuration
随机推荐
Verify the word limit of textarea input box. Only prompt but no submission limit
Tmall product details interface, tmall product coupon interface, tmall API interface, tmall price monitoring interface, tmall price comparison interface, brand rights protection interface, tmall sales
JS to get the date in the next seven days of the current date
How app inventor accesses resource files in assets directory
关于RSA加密解密原理
The 360 mobile assistant on Huawei maimang 7 cannot be uninstalled
regular expression
Uni app subcontracting loading and optimization
Problèmes et traitement du disque gbase 8a
File upload JS
Problems in the deconstruction and assignment of objects, comparison between empty strings and undefined
Tiktok keyword search list interface, ultra detailed interface docking steps
Deploy Yum warehouse and NFS shared services
CentOS installing MySQL and setting up remote access
JS obtain geographic location information according to longitude and latitude and mark it on the map
Cesium common events, including click events, mouse events, and camera movement events
Docker installing MySQL local remote connection docker container MySQL
Is signed or unsigned selected to create an integer field in MySQL? The answer is as follows:
logstash配置参考文章
1、 JS introduction