文本框

1.测试传参加密是否正确页面
 
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>Bootstrap 实例 - 文本框</title>
    <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css">  
    <script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>
    <script src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>

<form role="form">
    <div class="form-group">
        <label for="name">明文</label>
        <textarea class="form-control" rows="6"  id="input" ></textarea>    
    </div>
        <div class="form-group">
        <label for="name">密文</label>
        <textarea class="form-control" rows="6"  id="output" disabled></textarea>
    </div>
</form>
</body>
<script>
    $('#input').bind('keypress', function (event) {
        //回车键
        if(event.keyCode == "13"){

            // Do--Something
            //Out
            $('#output').text('output'+$('#input').val());
        }
    })
</script>
</html>
posted @ 2022-10-24 15:19  When?  阅读(181)  评论(0编辑  收藏  举报