How to use the Javascript to add/remove the CSS/colour style to the html page?

后端 未结 2 601
悲哀的现实
悲哀的现实 2021-01-16 02:20

I have a simple javascript question in the HTML page.

In my case, the user can use the mouse to select some text in the paragrahe, e.g. us

2条回答
  •  盖世英雄少女心
    2021-01-16 02:54

    You can use the following for selected text coloring (http://jsfiddle.net/7kh8s/):

    *This is a very basic one I did, but selected color is working.

    
    
    
        

    My name is John, I live in ABC and I have a car. I like to play TV game.

提交回复
热议问题