当前位置:网站首页>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 '
边栏推荐
- [pro test feasible] error while loading shared libraries solution
- Arduino receives and sends strings
- Poj1821 fence problem solving Report
- How to play video on unityui
- Is the gold content of intermediate e-commerce division in the soft exam high?
- 基于DE2 115开发板驱动HC_SR04超声波测距模块【附源码】
- Arduino board description
- 香橙派OrangePi 4 LTS开发板通过Mini PCIE连接SATA硬盘的操作方法
- The eighth training assignment
- Galaxy Kirin desktop operating system installation postgresql13 (source code installation)
猜你喜欢
![[pro test feasible] error while loading shared libraries solution](/img/e2/688ffa07861f38941cbf2cafdd9939.png)
[pro test feasible] error while loading shared libraries solution

I plan to take part in security work. How about information security engineers and how to prepare for the soft exam?

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

Force buckle 1002 Find common characters

Deeply understand the characteristics of database transaction isolation

【亲测可行】error while loading shared libraries的解决方案

How much review time does it usually take to take the intermediate soft exam?

verilog设计抢答器【附源码】

2021-04-08

【OneNote】无法连接到网络,无法同步问题
随机推荐
Basic knowledge of process (orphan, zombie process)
Which securities company is the best and safest to open an account for the subscription of new shares
The eighth training assignment
2022.7.4DAY596
[recommendation system 02] deepfm, youtubednn, DSSM, MMOE
[untitled]
Kitex retry mechanism
July 10, 2022 "five heart public welfare" activity notice + registration entry (two-dimensional code)
[OneNote] can't connect to the network and can't sync the problem
JS implementation chain call
Process control (creation, termination, waiting, program replacement)
Shardingsphere sub database and table examples (logical table, real table, binding table, broadcast table, single table)
Find the root of equation ax^2+bx+c=0 (C language)
[untitled]
关于jmeter中编写shell脚本json的应用
Wallhaven wallpaper desktop version
Some online academic report websites and machine learning videos
單調性約束與反單調性約束的區別 monotonicity and anti-monotonicity constraint
When initializing 'float', what is the difference between converting to 'float' and adding 'f' as a suffix?
【OneNote】无法连接到网络,无法同步问题