<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<select name="prl" id="prl" onchange="func6(this)">
    <option value="1">a</option>
    <option value="2">b</option>
    <option value="3">c</option>
    <option value="4">d</option>
    <option value="5">e</option>

</select>
<div>
<textarea name="pro" id="pro" cols="30" rows="10"></textarea>
</div>
</body>
<script src="/static/jquery-3.3.1.js"></script>
<script>
    function func6(ths) {
        var data=ths.options[ths.selectedIndex].text
        $('#pro').val(data)
    }
</script>
</html>

 

posted on 2018-05-10 14:46  liweideblogs  阅读(147)  评论(0编辑  收藏  举报