my name is Lore,
I need to put in evidence (yellow background or similar) a sentence in a webpage with javascript but I can't solve this.
I try to be more specific: I have to generate a link that points to a "random" url and puts in evidence some part of the text in the page. The page is not generated or known by me, anyway,(e.g. websites of news, catalogs ,written text in general that may be found by the browser with the CTRE+F sequence).
Do you think it is possible to do this via a simple link?
I tried to image how to do such a result. If I use frames and I load in the first frame a webpage that contains a specific javascript code and then visualize the external page from my wab page, the javascript will be applied to the external page too?
I mean something like this:
+- My webpage-----------------------------------+
| (with javascript code that puts in |
| evidence a list of words in the framed page |
| |
<--- frame ------------------------------------->
+---external webpage (eg AOL.com, msn.com,...)--+
| |
| |
| THE JUICE OF THE QUESTION: |
| Is it possible to put in evidence words |
| in this page? |
| I meed to arrive to this result with a |
| single click on a link that loads, this |
| framed page |
+---/ext开发者_运维技巧ernal webpage---------------------------+
<-- /frame ------------------------------------->
| |
+-- /My webpage---------------------------------+
Thankyou. Sorry for my english,
No, sorry but you can't access the iframe with Javascript unless the page in the frame is on your own server, and you can't make a link that tells the browser to execute some script on the new page after the user's browser is redirected.
What you want to do isn't possible at all using client side coding.
Uhm... and if I try to load the external page on my server, reparse it at all and simply put a css style as background for all the word of a specified list of them? It will sound like a page rebuilt, but if I cant' use javascript, the only way I can imagine is to load again a page, fo look for every single word and put a new propriety to the text... :-0 Thankyou for the answer.
Lore
精彩评论