简体   繁体   中英

ejs with progress bar

How to define or update style="width:<%=MettingPer %>;" for progress bar in ejs

 <li class="list-group-item d-flex justify-content-between align-items-center"> Meeting <div class="progress"> <div class="progress-bar progress-bar-striped bg-success progress-bar-animated" role="progressbar" style="width: 75%;" aria-valuenow="25" aria-valuemin="0" aria-valuemax="100"> <%=MettingPer %>%</div> </div> </li>

EJS is rendered on the server, not the browser, so EJS has no idea what document is since that's something that's only defined in the browser.

So for this you need to load your page completely on the client side with zero value.

Then complete it according to the instructions in JavaScript .

And as soon as you receive a response from the server, complete and hide it with a little delay.

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM