Highlight words on URL extension page

I wrote a php script that generates a list of links matching certain criteria.

I want the links to open in new browser windows with the selected words highlighted on the page.

Is there an easy way to do this? Please note that this is for personal use only, so this may be a specific browser solution.

+3
source share
2 answers

Edited to better answer the question.
Use AJAX to load the page, and then process the returned HTML. I prefer to use jQuery. Check out this guide for loading HTML from other pages. http://css.dzone.com/articles/jquery-load-data-from-other-pa
After you receive the data, I think you can easily understand how to analyze it.

JQuery example from the link: (not my code)

<div id="container">
<a href="#" id="loadData">Click This Link To Load My Favorite Movies</a>
</div>
    $(document).ready(function()
     {
      $("#loadData").click(function()
       {
        $(this).text("...One Moment Please...");
         $("#container").append('<div id="favoriteMovies"></div>')
                        .children("#favoriteMovies").hide()
                        .load("theOtherPage.htm ul#favoriteMovies", function()
                         {
                          $("#loadData").remove();
                          $("#favoriteMovies").slideDown("slow");
                         });
       return false;
       });
    });

Downloadable page:

<ul id="favoriteMovies">
<li style="font-weight: bold; list-style-type: none;">My Favorite Movies</li>
<li>Contact</li>
<li>Shawshank Redemption</li>
<li>Napoleon Dynamite</li>
<li>Back To The Future</li>
<li>The Goonies</li>
<li>Cinderella Man</li>
<li>Apollo 13</li>
</ul>

Note: please someone let me know if I will not send the code from another site, but send the link instead. I don't want to annoy anyone. thank.

0
source

, , = . $_GET css

0

Source: https://habr.com/ru/post/1758770/


All Articles