如何使用DOM HTML javascript或PHP函数从html页面恢复数据?

i'm creating a simple website for passionates of motorsport full of results of every race type, divided in categories and single races for every championship, for example

<div class="box">
  <div class="header"><p>New Zealand National racing Championship</p></div>
    <div class="races">
      <p><em>January 1</em> ???</p>
      <div class="race">
         <p><strong>Marlborough Circuit</strong></p>
         <p>&nbsp;</p>
         <p>1th - James Palmer (Brabham BT7A Coventry-Climax FPF s4 2750cc)               </p>
         <p>2th - XXXXXXXXXXXX (XXXXXX)</p>
         <p>3th - YYYYYYYYYYYY (YYYYYY)</p>
      </div>
    </div>
 </div>

now i want to search some results in a search box with a script which examines all pages in the directory with results, extract all the wanted data and format them in another page, for example with the given example

New Zealand National racing Championship

(January 1 1965) ??? Marlborough Circuit
1th - James Palmer (Brabham BT7A Coventry-Climax FPF s4 2750cc)
2th - XXXXXXXXXXXX (XXXXXX)
3th - YYYYYYYYYYYY (YYYYYY)

how i can do it? can i create a PHP page which uses DOm functions to extract these data or i can use javascript or jquery?

You mean that you have all your data in PHP-files? You do not get them from a database? Then can you not use javascript or jquery, because all those PHP-files reside on the server and javascript works only clientside. If you want to create a search and you are using PHP-files, then will you have to parse all PHP-files to find the results. That is very clumsy to say the least and very error prone. What if you change your display of data? Your search will not work anymore too. You will have to adapt your search due to that. That is not the way to go. If you do not want to work with a database, then could you at least work with data-files. You would have only to look through the data-files to create a search and you will not have to rewrite your search every time you change the layout of your website.

If you take a look at JSON, then have you a good format for your data-files. It is easy to parse and independent of the layout of your website.

http://www.w3schools.com/json/

http://www.copterlabs.com/blog/json-what-it-is-how-it-works-how-to-use-it/

http://www.tutorialspoint.com/json/json_php_example.htm

You can use each json-file as data for a page too.

I have read the comments. If you really use that many data (all racers in a race with their motor bikes etc..) then is it really better to use a database. You can create a php-page, enter a race and all the racers, submit the form and have them stored in the database. It will work with JSON as well, but the more data you enter, the slower search will be. The more data you will enter in your site, the less better it will work. It is a pity for your effort.