jquery - Get content within a tag using Javascript from HTML -
I want a JavaScript code that goes through all the HTML files in my original folder and sub-folders and the content Receives a particular tag, such as:
& lt; Div id = "content" & gt; !! This stuff !! & Lt; / Div & gt;
It should check for a comment at the top of HTML, and only if the content exists.
& lt ;! - Allowed ->
It should only be found if it exists there. First of all, is this possible? I want jquery can do that!
Update: Javascript is for the client side that enlightened! So one last question, how do you use php to get the content within a particular tag?
& lt; Div id = "content" & gt; !! This stuff !! & Lt; / Div & gt;
Firstly you must find all the folders in the folder (but the server). It is not possible with JavaScript only, you have to write a PHP (or other web-language supported on your webspace / server) that provides you file namespace. You can then load each file with jQuery's AJAX functions for your file and test for your comments and more.
Comments
Post a Comment