文本框的SelectionDirection属性

 

代码实例:

 

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>test</title>
</head>

<body>
<script>
    function AD() {
        var control=document.forms[0]['test'];
        var Direction=control.selectionDirection;
        alert(Direction);
    }
</script>

    <form>
    <input type="test" name="test">
    <input  type="button"  value="点击一下"   onclick="AD()">
    </form>

</body>
</html>

 

  效果:

2017-09-02   23:56:57

 

posted @ 2017-09-02 23:58  1点  阅读(968)  评论(1编辑  收藏  举报