简体   繁体   中英

how to show output in javascript

I created an application using HTML and JavaScript. I have a couple of questions on how a program can show output and how it can validate input.

For showing output I have things like using the console.log statement, and using the alert . I was just wondering what is considered showing an output. would the hiding of different elements be an example of an output as when the user decides to click on certain features of the site others are hidden. also would the use of innerHTML be another example of an output?

As per my understanding you want to render output on front side.. if you have small data to show on front side then you can render all data at once on front and you can do show hide data based on user selection. so it will be fast for user experience.

But if you have large data to render on front, then it will be good if you pull particular data based on user selection at same time..(innerhtml)..

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