-
Notifications
You must be signed in to change notification settings - Fork 14
Another Examples
Fanon Jupkwo edited this page Jun 13, 2022
·
6 revisions
Given these HTML, these are JS we get respectively:
<div>
<h1>Open Source Society Cameroon</h1>
<p>jsgenerator : Translating from Html to Js</p>
<h2>About</h2>
<p>
The goal is to generate Javascript from HTML following the JavaScript DOM structure.
Sometimes, we forget how to use javascript to build dynamic web apps.
Thus, the goal of this project is helping developers gaining time by producing javascript code as output based on html as input.
This project will be very useful for beginners learning html and javascript.
</p>
<p>
The project is based on <a href="https://jsoup.org/">jsoup library, a java html parser</a> / <a href="https://github.com/jhy/jsoup/">Jsoup GitHub Repository</a> .It's all about using nodes to generate javascript.
</p>
<p>
Actually, it's just a console program but gradually we will build a Maven/Gradle library then a web app translating from Html to Js, an app similar to <a href="https://translate.google.com/">Google Translate</a>.
</p>
</div>let h1 = document.createElement("h1");
h1.appendChild(document.createTextNode("Open Source Society Cameroon "));
let p = document.createElement("p");
p.appendChild(document.createTextNode("jsgenerator : Translating from Html to Js "));
let h2 = document.createElement("h2");
h2.appendChild(document.createTextNode("About "));
let p_ = document.createElement("p");
p_.appendChild(document.createTextNode("The goal is to generate Javascript from HTML following the JavaScript DOM structure.
Sometimes, we forget how to use javascript to build dynamic web apps.
Thus, the goal of this project is helping developers gaining time by producing javascript code as output based on html as input.
This project will be very useful for beginners learning html and javascript. "));
let a = document.createElement("a");
a.setAttribute("href", "https://jsoup.org/");
a.appendChild(document.createTextNode("jsoup library, a java html parser "));
let a_ = document.createElement("a");
a_.setAttribute("href", "https://github.com/jhy/jsoup/");
a_.appendChild(document.createTextNode("Jsoup GitHub Repository "));
let p__ = document.createElement("p");
p__.appendChild(document.createTextNode("The project is based on "));
p__.appendChild(a);
p__.appendChild(document.createTextNode("/ "));
p__.appendChild(a_);
p__.appendChild(document.createTextNode(".It's all about using nodes to generate javascript. "));
let a__ = document.createElement("a");
a__.setAttribute("href", "https://translate.google.com/");
a__.appendChild(document.createTextNode("Google Translate "));
let p___ = document.createElement("p");
p___.appendChild(document.createTextNode("Actually, it's just a console program but gradually we will build a Maven/Gradle library then a web app translating from Html to Js, an app similar to "));
p___.appendChild(a__);
p___.appendChild(document.createTextNode(". "));
let div = document.createElement("div");
div.appendChild(h1);
div.appendChild(p);
div.appendChild(h2);
div.appendChild(p_);
div.appendChild(p__);
div.appendChild(p___);
<div>
<h1>Open Source Society Cameroon</h1>
<p>jsgenerator : Translating from Html to Js</p>
<h2>About</h2>
<p>
The goal is to generate Javascript from HTML following the JavaScript DOM structure.
Sometimes, we forget how to use javascript to build dynamic web apps.
Thus, the goal of this project is helping developers gaining time by producing javascript code as output based on html as input.
This project will be very useful for beginners learning html and javascript.
</p>
<p>
The project is based on <a href="https://jsoup.org/">jsoup library, a java html parser</a> / <a href="https://github.com/jhy/jsoup/">Jsoup GitHub Repository</a> .It's all about using nodes to generate javascript.
</p>
<p>
Actually, it's just a console program but gradually we will build a Maven/Gradle library then a web app translating from Html to Js, an app similar to <a href="https://translate.google.com/">Google Translate</a>.
</p>
</div>let h1 = document.createElement("h1");
h1.appendChild(document.createTextNode("Open Source Society Cameroon "));
let p = document.createElement("p");
p.appendChild(document.createTextNode("jsgenerator : Translating from Html to Js "));
let h2 = document.createElement("h2");
h2.appendChild(document.createTextNode("About "));
let p_ = document.createElement("p");
p_.appendChild(document.createTextNode("The goal is to generate Javascript from HTML following the JavaScript DOM structure.
Sometimes, we forget how to use javascript to build dynamic web apps.
Thus, the goal of this project is helping developers gaining time by producing javascript code as output based on html as input.
This project will be very useful for beginners learning html and javascript. "));
let a = document.createElement("a");
a.setAttribute("href", "https://jsoup.org/");
a.appendChild(document.createTextNode("jsoup library, a java html parser "));
let a_ = document.createElement("a");
a_.setAttribute("href", "https://github.com/jhy/jsoup/");
a_.appendChild(document.createTextNode("Jsoup GitHub Repository "));
let p__ = document.createElement("p");
p__.appendChild(document.createTextNode("The project is based on "));
p__.appendChild(a);
p__.appendChild(document.createTextNode("/ "));
p__.appendChild(a_);
p__.appendChild(document.createTextNode(".It's all about using nodes to generate javascript. "));
let a__ = document.createElement("a");
a__.setAttribute("href", "https://translate.google.com/");
a__.appendChild(document.createTextNode("Google Translate "));
let p___ = document.createElement("p");
p___.appendChild(document.createTextNode("Actually, it's just a console program but gradually we will build a Maven/Gradle library then a web app translating from Html to Js, an app similar to "));
p___.appendChild(a__);
p___.appendChild(document.createTextNode(". "));
let div = document.createElement("div");
div.appendChild(h1);
div.appendChild(p);
div.appendChild(h2);
div.appendChild(p_);
div.appendChild(p__);
div.appendChild(p___);