interviews.dotnetthread.com

↑ Grab this Headline Animator

Friday, January 4, 2013

Highlight a keyword dynamically in any HTML document

How to highlight a word in a web page document using a simple javascript function.

Consider any sample HTML page and write a JavaScript code to do the following:

1.Replace a word (ex: “HTML”) with a link (text: HTML and hrefhttp://www.google.co.in/#q=HTML)
2.This function should not replace anything inside an anchor tag.

Solution:
Check out the solution here http://goo.gl/atNyB 


Submit this story to DotNetKicks

No comments:

Post a Comment

Post your comments/questions/feedback for this Article.

 

Latest Articles