文本框的SelectionDirection属性

时间:2022-12-08 20:30:09

文本框的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>

 

  效果:

文本框的SelectionDirection属性

2017-09-02   23:56:57