<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <script type="text/javascript" src="http://www.xdocin.com/xdoc.js"></script> </head> <body> <input type="button" onclick="gen()" value="诗词排版"/> <br/> <script type="text/javascript"> function gen() { var params = { "title": "静夜思", "author": "李白", "content": "床前明月光,\n疑是地上霜。\n举头望明月,\n低头思故乡。" }; XDoc.run("./poem.xdoc", "png", params, "_blank"); } </script> </body> </html>
http://xdocin.com/poem.pdoc?_format=html