Skip to main content

Home/ Scripters/ Group items tagged data

Rss Feed Group items tagged

Jac Londe

Parsing HTML using Javascript - 0 views

  • Ive written a small js application that gets html content as a string (this only has to work in mozilla)
  • req = new XMLHttpRequest(); req.open('GET', URI, true); req.onreadystatechange = function (aEvt) { if (req.readyState == 4) { if(req.status == 200){ var myTxt = req.responseText;
  • This works fine - myTxt contains the html code as a string. However I want to be able to parse the code using the DOM... Is there a way to create an HTML DOM in Javascript easily?
  • ...1 more annotation...
  • var myTxt = req.responseXML.documentElement; alert(myTxt.getElementsByTagName("XMLElementName")[0].firstChild.data);
Jac Londe

Write text - How to Create Simple HTML5 Application Output with JavaScript - For Dummies - 1 views

  • <!DOCTYPE html> <html> <head> <title>Outputting Data to HTML</title> <script language="JavaScript"> function WriteText() { document.getElementById("myText").innerHTML = "Clicked!"; } </script> </head> <body> <h1>Creating HTML Element Output</h1> <div><p id="myText">Change Me</p></div> <div><input id="btnClickMe" type="button" value="Click Me" onclick="WriteText()" /> </div> </body> </html>
Jac Londe

Node.js - 0 views

  •  
    Système du moindre coût. Simplifie les communications sur les réseaux. Fonctionne avec Tableau.Publique
1 - 4 of 4
Showing 20 items per page