引用jquery,jquery.textareafullscreen.js和textareafullscreen.css到你的页面head位置
<script src="http://libs.baidu.com/jquery/1.10.2/jquery.min.js"></script> <script src="jquery.textareafullscreen.js"></script> <link rel="stylesheet" href="textareafullscreen.css">
html
添加一个textarea设置id
<textarea id="demo"></textarea>
js调用插件
<script> $(document).ready(function() { $('#demo').textareafullscreen(); }); </script>