应该可以用的.我这里是可以用的.
要不改成pageX.
<script>
var x =10000;
function clt(e)
{
    x += e?e.pageX:window.event.clientX;
    alert(x);
}
window.onload = clt;
</script>

解决方案 »

  1.   

    HTMLEvents
    不带clientX
    要想获取
    必须用MouseEvents
    Table 17-3.Event types Event type
    Interface
    B
    C
    Supported by/detail properties
     
    abort
    Event
    yes
    no
    <img>, <object>
     
    blur
    Event
    no
    no
    <a>, <area>, <button>, <input>, <label>, <select>, <textarea>
     
    change
    Event
    yes
    no
    <input>, <select>, <textarea>
     
    click
    MouseEvent
    yes
    yes
    screenX, screenY, clientX, clientY, altKey, ctrlKey, shiftKey, metaKey, button, detail
     
    error
    Event
    yes
    no
    <body>, <frameset>, <img>, <object>
     
    focus
    Event
    no
    no
    <a>, <area>, <button>, <input>, <label>, <select>, <textarea>
     
    load
    Event
    no
    no
    <body>, <frameset>, <iframe>, <img>, <object>
     
    mousedown
    MouseEvent
    yes
    yes
    screenX, screenY, clientX, clientY, altKey, ctrlKey, shiftKey, metaKey, button, detail
     
    mousemove
    MouseEvent
    yes
    no
    screenX, screenY, clientX, clientY, altKey, ctrlKey, shiftKey, metaKey
     
    mouseout
    MouseEvent
    yes
    yes
    screenX, screenY, clientX, clientY, altKey, ctrlKey, shiftKey, metaKey, relatedTarget
     
    mouseover
    MouseEvent
    yes
    yes
    screenX, screenY, clientX, clientY, altKey, ctrlKey, shiftKey, metaKey, relatedTarget
     
    mouseup
    MouseEvent
    yes
    yes
    screenX, screenY, clientX, clientY, altKey, ctrlKey, shiftKey, metaKey, button, detail
     
    reset
    Event
    yes
    no
    <form> 
     
    resize
    Event
    yes
    no
    <body>, <frameset>, <iframe>
     
    scroll
    Event
    yes
    no
    <body> 
     
    select
    Event
    yes
    no
    <input>, <textarea>
     
    submit
    Event
    yes
    yes
    <form> 
     
    unload
    Event
    no
    no
    <body>, <frameset>
     
    DOMActivate
    UIEvent
    yes
    yes
    detail 
     
    DOMFocusIn
    UIEvent
    yes
    no
    none
     
    DOMFocusOut
    UIEvent
    yes
    no
    none
      

  2.   

    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
    <title>无标题文档</title>
    <style type="text/css">
    <!--
    #Layer1 {
    position:absolute;
    width:95px;
    height:20px;
    z-index:1;
    }
    -->
    </style>
    </head>
    <body>
    <div id="Layer1"><a id="clicklink" href="#">click here</a></div>
    <script>
    var x =10000;
    function clt(e)
    {
    x += e?e.clientX:window.event.clientX;
    alert(x);
    }
    document.getElementById('clicklink').onclick = clt;
    </script>
    </body>
    </html>这样就没问题了,楼上那张表我看过(http://blog.csdn.net/Xviewee/archive/2007/05/11/1604562.aspx),当时没看明白,现在懂了些了  。                                                                          
      

  3.   

    :D
    嗯..window.onload触发的是HTMLElementsonclick触发的是MouseEvents