| |||||||||
| |||||||||
| Not A Member Yet? Register today and become part of the community. |
| |||||||
| Javascript Need help with the (primarily) client-side programming language? This is the place. Includes discussion on AJAX (Asynchronous JavaScript and XML). |
![]() |
| | LinkBack | Thread Tools | Display Modes |
| |||
| click? JavaScript to dynamically reposition, a message in a DIV element to the current position of the mouse cursor, anywhere within the Body of the document in the event of a mouse click? |
| |||
| Try the following. The body tab responds to the onclick event and calls a function that sets the top and left properties of the style of the divthis is the textfunction doit(event){bleck.style.left=event.clientXbleck.st yle.top=event.clientYalert("X coords: " + x + ", Y coords: " + y)} |
![]() |
| Thread Tools | |
| Display Modes | |
| | |||||
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How can javascript tell if the mouse is ... | beleoa | Javascript | 2 | 05-23-2007 02:49 AM |
| question about ways to apply CSS to a web page and/or linked element. | flickall | HTML/CSS/DHTML | 2 | 02-18-2007 08:19 PM |
| Error Message | espn4 | Free Web Hosting Support | 9 | 01-13-2007 04:50 PM |
| Profuse welcome message | wgallt | Free Web Hosting Support | 1 | 10-12-2006 07:40 PM |
| Web Site Error Message | MegaManX | Free Web Hosting Support | 1 | 02-20-2006 05:36 PM |