当前位置:网站首页>JS add spaces to the string
JS add spaces to the string
2022-07-07 11:09:00 【Have a good time I】
js String concatenation space , An old question about growth is often forgotten , Let's make a record
requirement : Because the specification configuration is string splicing , As shown in the figure, the specification configuration is required to add spaces to this character 
I tried several methods, but they didn't work
1. direct +' ' Direct to ignore , No effect .
2. direct +' ' Put... Directly Output , Negative effects .
3. direct +'\xa0', Direct success , If you need a few spaces, just splice a few '\xa0'
The splicing method of the above figure is as follows :
const specificationConfiguration =
' Resource name :' +
conf.resourceName +'\xa0\xa0\xa0\xa0\xa0\xa0'+
' processor :' +
conf.processor +'\xa0\xa0\xa0\xa0\xa0\xa0'+
' Memory :' +
conf.memory +'\xa0\xa0\xa0\xa0\xa0\xa0'+
' computer network :' +
conf.network +'\xa0\xa0\xa0\xa0\xa0\xa0'+
' Free :' +
conf.freeCpus+' nucleus '
边栏推荐
- 2021-04-23
- The fifth training assignment
- Still cannot find RPC dispatcher table failed to connect in virtual KD
- uniCloud
- SQL Server 知识汇集9 : 修改数据
- [pro test feasible] error while loading shared libraries solution
- [système recommandé 01] rechub
- Unity downloads files through the server address
- Opencv installation and environment configuration - vs2017
- [untitled]
猜你喜欢

Socket socket programming
![[C #] the solution of WinForm operation zoom (blur)](/img/66/b70213c95acd4ad9fe2eb739bd46b5.png)
[C #] the solution of WinForm operation zoom (blur)

Verilog 实现数码管显视驱动【附源码】

【安装系统】U盘安装系统教程,使用UltraISO制作U盘启动盘

Ping tool ICMP message learning

“梦想杯”2017 年江苏省信息与未来小学生夏令营 IT 小能手 PK 之程序设计试题

从色情直播到直播电商

Opencv installation and environment configuration - vs2017

The concept, implementation and analysis of binary search tree (BST)

关于jmeter中编写shell脚本json的应用
随机推荐
Mpx 插件
seata 1.3.0 四種模式解决分布式事務(AT、TCC、SAGA、XA)
What are the contents of the intermediate soft test, the software designer test, and the test outline?
Introduction to shell programming
SQL Server 知识汇集11 : 约束
Unity websocket client
Basic knowledge of process (orphan, zombie process)
【安装系统】U盘安装系统教程,使用UltraISO制作U盘启动盘
Compile QT project script with qmake
Rolling puddle Uni_ App (VIII)
Verilog 实现数码管显视驱动【附源码】
TypeScript 接口继承
China Southern Airlines pa3.1
The concept, implementation and analysis of binary search tree (BST)
2022.7.5DAY597
Simple and easy to modify spring frame components
Vscode 尝试在目标目录创建文件时发生一个错误:拒绝访问【已解决】
The use of list and Its Simulation Implementation
JSON format query of MySQL
After the uniapp jumps to the page in onlaunch, click the event failure solution