How to access DOM using Node.js?
问题 I have an editor.html that contains generatePNG function: <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Diagram</title> <script type="text/javascript" src="lib/jquery-1.8.1.js"></script> // <!-- I use many resources --> <script></script> <script> function generatePNG (oViewer) { var oImageOptions = { includeDecoratorLayers: false, replaceImageURL: true }; var d = new Date(); var h = d.getHours(); var m = d.getMinutes(); var s = d.getSeconds(); var sFileName = "diagram" + h