I'm working on a dummy operating-system in HTML. In this operating system there is a program called the Application Manager. A part of that program is to display a list of all the running applications. Here is the code:
var x = activeApps
document.getElementById('openAppsList').innerHTML = x
The problem is, when I do this, the text that shows up on screen is this:
Is there any way that I can show the items under each other, like this:
AppManager
Downloads
myPictures
I'm using vanilla JavaScript on a local Apache Server.
x = 'AppManager,Downloads,myPictures' document.getElementById('openAppsList').innerHTML = x.replace(/\,/g, '<br/>');
<html> <body><div id="openAppsList"></div> </body> </html>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.