Some code snips

StXh
Feb 6, 2021

I’m writting javascript now, and use jQuery on my web pages. Of cause doing lots of goole and stackoverfllow.

So, I get some code snips here for remember.

Caculate coords in HTML’s <map> <area> tag

I found more example in the net. But they allmost are same. More functions more for loops. Not the javascript way. So I rewriter it as this.

As you can see, I use each and map do the javasript things.

Highlight html <select> <option> with Text

After try a lot of stackoverflows, I found use this code can selected the option with option text instead option value.

--

--