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

2017-09-02   23:56:57

 

越努力越幸运