From: http://sofish.de/1498
Everything about location and height is especially troublesome in JS. Fortunately, for some reason, there are few places to use. This has also become an excuse for not understanding. Come back tonight to take a look at the book. Let's take a look at the compatible way to get the mouse position.
Although Javascript is not as difficult as CSS, compatibility has always been the most uncomfortable. Fortunately, there are PPK teachers and Google teachers. To put it simply, streamline it into this table:
| Attribute |
Reference Point |
Browser compatibility |
| ClientX, ClientY |
Document |
IE |
| PageX, PageY |
Window |
Sane browsers |
| Other LayerX, LayerY, OffsetX, OffsetY, ScreenX, ScreenY, x, and y are flat clouds. |
Then, let's look at another Demo: Click here to click here! (Place your mouse on the page and drag it out)
================
Okay, this is a split line. In fact, I have always wanted to write a blog. However, sometimes wasu network is not powerful, and the editor is not powerful. MB. I cannot write it. It took a long time to get a blog and write hundreds of words. Really, RP, looks, float cloud. SHIT.
In other words, we have gained a lot recently. However, I am busy at the company during the day and come back late at night. Many of the shares are also biased towards sending tweets. My blog ignored her day by day. In fact, this is not feasible.
I feel that young people should write more (even if they are older). The results of writing and thinking are always very different. As PPK said, write down and share, so that he can gain a lot. Yes, especially when writing a DEMO. In order to be worthy of the readers, it is necessary to test in many aspects. In fact, I have accumulated a lot of experience for myself. Maybe you are the same.
Teenagers. Write it down when you are free.