当前位置:网站首页>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 '
边栏推荐
- PR Lecture Notes
- Use load_ decathlon_ Datalist (Monai) fast loading JSON data
- Still cannot find RPC dispatcher table failed to connect in virtual KD
- How to play video on unityui
- Typescript interface inheritance
- Arduino receives and sends strings
- QT document
- 基于STC8G1K08的0.96寸IIC液晶屏驱动程序
- Mpx 插件
- Some online academic report websites and machine learning videos
猜你喜欢

Unable to open kernel device '\.\vmcidev\vmx': operation completed successfully. Reboot after installing vmware workstation? Module "devicepoweron" failed to start. Failed to start the virtual machine

单调性约束与反单调性约束的区别 monotonicity and anti-monotonicity constraint

單調性約束與反單調性約束的區別 monotonicity and anti-monotonicity constraint

Deeply understand the characteristics of database transaction isolation

Vscode 尝试在目标目录创建文件时发生一个错误:拒绝访问【已解决】

The use of list and Its Simulation Implementation

China Southern Airlines pa3.1

SQL Server knowledge gathering 9: modifying data

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

【推薦系統 01】Rechub
随机推荐
I plan to take part in security work. How about information security engineers and how to prepare for the soft exam?
Operation method of Orange Pie orangepi 4 lts development board connecting SATA hard disk through mini PCIe
2022.7.4DAY596
Idea shortcut keys
【C#】WinForm运行缩放(变糊)的解决方法
Multithreaded application (thread pool, singleton mode)
[système recommandé 01] rechub
Mpx 插件
Poj1821 fence problem solving Report
Ffmpeg record a video command from RTSP
关于jmeter中编写shell脚本json的应用
PostgreSQL中的表复制
Deep understanding of Apache Hudi asynchronous indexing mechanism
verilog设计抢答器【附源码】
JS implementation chain call
China Southern Airlines pa3.1
The eighth training assignment
Network foundation (1)
Opencv installation and environment configuration - vs2017
Hash / (understanding, implementation and application)