Navigation Menu

Site Contents
What's New?


Site FAQ
About JSS
JavaScript Forum
JavaScript Tutorial
Friends of JSS

Link to Us
JavaScript Help
Contribute a script
Technology Jobs

Internet.commerce

Partner With Us
Promotional Products
Compare Prices
Imprinted Promotions
GPS
Auto Insurance Quote
Home Improvement
KVM Switches
Computer Deals
Web Hosting Directory
Promote Your Website
KVM Switch over IP
Online Shopping
Phone Cards
Prepaid Phone Card

Internet.com

IT
Developer
Internet News
Small Business
Personal Technology
International

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers

Developer Channel

FlashKit.com
JavaScript.com
JavaScriptSource
Developer Jobs
ScriptSearch
StreamingMediaWorld
Web Developer's Journal
Web Developer's Virtual Library
WebDeveloper.com
Webreference
Web Hosts
XMLfiles.com

Great Sites

DocJavaScript.com
dhtml.com
The Freebie Directory
TheFreeSite.com

Browse Doc JS's Tips!


Hiermenus Central


Promotions

Free Announcements


General

This is an easy way to determine the mouse position on a Web page. Click anywhere on the page and the coordinates will be displayed.


You can store them in form fields

x = y =

or as plain text

   

Notes

Source Code

Paste this source code into the designated areas.

External file

Paste this code into an external JavaScript file named: mousePosition.js


Head

Paste this code into the HEAD section of your HTML document.


Body

Paste this code into the BODY section of your HTML document


User Comments

Add a comment, suggestion, or correction
[For questions about usage, consult the Notes tab above or visit the JavaScript forum]

    
   
       
[optional field]
 
[optional field]

   

Comments feed Comment Feed RSS 2.0

2. From: Adrian
it works
05/02/2008 03:00:03

It really works in all browsers i tested. Thanks! I have tried many other types of cursor position functions but this really works and it is very easy to understand and use.

We thank you THE JAVASCRIPT SOURCE!

1. From: lavercq
Langage and History
06/02/2007 12:12:27

Thank's
Interesting for use with CSS !


Do you write JavaScripts?
If you do, why not submit them to us?
We'll give you credit and a link back to your Web site.