Home > Back-end >  Questions about EmbeddedWB
Questions about EmbeddedWB

Time:10-12

Want to use HTML to do programming interface, but don't want to put the HTML and javascript code to the client, want to in the database, using EmbeddedWB. LoadFromStreams is achievable, but there is a trouble thing is:

If the HTML need through & lt; Script> Reference other js code, how can you control to take corresponding js code database, rather than have to use the js file?

CodePudding user response:

Used EmbeddedWB, don't know whether its call IE core to HTML? As the webBrowser to parse HTML? If so, then the client or the service on HTML, JS, download files to a directory of local, reload, if in the database, if specified & lt; Script> And your server-side HTML, JS file is not to make a WEB service to provide, why does it take to resolve the JS, read the corresponding files, as if this is in trouble,,,, and other resource files? Such as small ICONS, CSS...

CodePudding user response:

Two fields in database can be used to store the HTML code and js code, such as using field respectively Field1 and Field2 said
Then in the program can control like this:
If meet the conditions then
EmbeddedWB. LoadFromStreams (Field1 + Field2)
The else
EmbeddedWB. LoadFromStreams (Field1);

CodePudding user response:

A simple way is to own syntax parsing, for example & lt; Script SRC='https://bbs.csdn.net/topics/{DB}/XXX/& gt; The building Lord first read from a database, and then query the DB wrote in a temporary file a {DB} to replace again, closed program delete temporary files line

CodePudding user response:

I now use a lazy man, the code directly to the memo, and use it every time you directly read
If you use the script, make out of these resources, and use it every time you release again, then only need to read the script for the current directory

CodePudding user response:

Read out first, and then parse "& lt; The script "and"/& gt;" Between content, and then analysis the content after the SRC, then to read database corresponding js, again according to the path of the SRC can preservation
  • Related