当前位置:网站首页>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>
边栏推荐
- 天猫商品详情接口,天猫商品优惠券接口,天猫api接口,天猫价格监控接口,天猫比价接口,品牌维权接口,天猫销量api接口,接口代码可对接数据分析业务,品牌维权,比价业务,行业分析业务接口代码分享
- VI editor
- 關於RSA加密解密原理
- Wrap dynamically created child elements in dynamically created structures
- Calculation method of paging
- redis.exceptions.ConnectionError: Error 111 connecting to 172.16.8.128:6379. Connection refused.
- Implement authentication code login and remember password (cookie)
- Buuctf web (IV)
- Remote access and control
- In order to resist the flood, the soldiers have been fighting for 89 hours. How many days and hours are there in total?
猜你喜欢
MySQL parsing serialized fields
Guidance process and service control
关于RSA加密解密原理
JS - simple ATM of the for cycle case
JS - max. of array cases
Animation through svg
ADT Google browser plug-in ad Terminator
Uni app subcontracting loading and optimization
Is signed or unsigned selected to create an integer field in MySQL? The answer is as follows:
redis.exceptions.ConnectionError: Error 111 connecting to 172.16.8.128:6379. Connection refused.
随机推荐
[pychart pit stepping record] prompt after configuring remote operation, [errno 2] no such file or directory
JS - array de duplication in the array object case
Differences and uses among cookies, localstorage, sessionstorage, and application caching
Is signed or unsigned selected to create an integer field in MySQL? The answer is as follows:
Container concept and cloud native
filebeat采集日志到ELK
redis. exceptions. ConnectionError: Error 111 connecting to 172.16.8.128:6379. Connection refused.
[leetcode weekly race record] record of the 80th biweekly race
Buuctf web (III)
Centering problem - the width and height of child elements are known
Logstash configuration reference article
Taobao commodity historical price interface / commodity historical price trend interface code docking and sharing
On the use of regular expressions (bracket problem)
Installing pytorch under Anaconda
Svg text stroke effect
MySQL 8.0 modifying SQL_ mode=only_ full_ group_ by
顺时针打印个数组
8、 JS data type conversion
Wrap dynamically created child elements in dynamically created structures
淘宝商品历史价格接口/商品历史价走势接口代码对接分享