2014-04-02から1日間の記事一覧
異なるcontainer(document)ではユニークなidを捜査する方法がないため、実装されていないようですね。 If you use getElementById to with document like - document.getElementById then it always works.But however, if we perform the same on an elemen…
こういうように、サイトコンテンツがそのまま入れ替わって表示できる。documentElement*1 js var ParseDocument=function(str){ this.str = str; this.elements = document.documentElement; this.constructor(); }; ParseDocument.prototype={ constructor:…
eだけではなくe.stackをalertさせるべき。 Error: Failed to execute 'appendChild' on 'Node': The new child element is null. at XMLHttpRequest. (http://html5efo.efolab.com/contents/test/004/parseDocument.js:66:35) という情報が出る。 try{ //処…
/** * 新しいdocumentElementにtextを代入してdocumentを作成します。 * ownerDocumentが同一なのでappendできます。 */ var parseDocument = function(str) { var element = document.createElement('documentElement'); // var container = document.creat…
var imgTexts = text.match(/<img\s+.+>/);</img\s+.+>