简体   繁体   中英

Run javascript on server and send DOM results to client

I've been stuck on this one for a while, so it's time to consult the pros. I've created a charting application that uses javascript to do heavy DOM manipulation/generation on the client (creating barcharts made of colored divs, etc).

Long story short, I want to avoid sending my js library to the client. Is there any way to create the content on the server, using my existing javascript library, and only send the javascript-generated HTML to the client?

Thanks for taking the time!

Node.js可能会做您想做的事,它已用于通过YUI3进行DOM操作

Try to convert your JavaScript DOM code to Java W3C DOM on ItsNat , for instance, take a look to this example . Umm is based on Java not .Net.

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