实用的jquery输入框增加列表代码

 时间:2024-10-12 17:09:44

1、新建html文档。

实用的jquery输入框增加列表代码

2、书写hmtl代艨位雅剖码。<div class="main"> <di即枢潋雳v class="header"> <h2>jQuery Listarea</h2> <p>Listarea.js is a jQuery plugin that allows you to quickly and easily add a list of items to a textarea or input field.</p> </div> <div class="content"> <h3>Demo</h3> <div class="formWrap"> <form id="demoForm"> <label for="listarea">List Area:</label> <textarea id="listarea" name="listarea"></textarea> <input type="submit" value="See List" /> </form> </div> <h3>Setup</h3> </div></div>

实用的jquery输入框增加列表代码

3、书写css代码。label { vertical-align: top; }input { displ锾攒揉敫ay: block; }html, body { color: #888888; background-color: #ffffff; margin: 0; }.gitfork img { position: absolute; top: 0; left: 0; }.main { width: 800px; margin: 80px auto; margin-bottom: 220px; font-size: 1.1em; background-color: #ffffff; z-index: 20; position: relative; }.content { color: #444444; margin-top: 70px; }.header h2 { text-align: center; color: #444444; font-size: 1.6em; }.header p { text-align: center; color: #444444; font-size: 1.2em; }.formWrap { margin-top: 30px; background-color: #D1D1D1; padding: 20px 6px; border-bottom: 1px solid black; }input[type="submit"] { padding: 8px 10px; margin-top: 15px; border: 1px solid #ccc; cursor: pointer; background-color: #0072bb; color: white; }label { color: #444444; margin-right: 5px; font-weight: bold; }.copyright { margin-left: 8px; }.copyright > p, .copyright > a { display: inline-block; }.copyright > a { text-decoration: none; cursor: pointer; color: inherit; font-weight: bold; z-index: 20; position: relative; }a img { border: none; }.download { position: fixed; width: 100%; font-size: 1.1em; z-index: 1; bottom: 20px; color: #444444; }.download div { width: 800px; margin: 50px auto; z-index: 1; border-top: 1px solid black; }

实用的jquery输入框增加列表代码

4、书写并添加js代码。<script src="js/jquery.min.js"></script><script src="js/jquery.listarea.js"></script><script src="js/rainbow-custom.min.js"></script><script> $(function(){ $('#listarea').listarea({ effect: 'slow' }); $('form').on('submit', submitDemoForm); Rainbow.color(); }); </script>

实用的jquery输入框增加列表代码

5、代码整体结构。

实用的jquery输入框增加列表代码

6、查看效果。

实用的jquery输入框增加列表代码
热门搜索
爱的手抄报图片 预防疾病手抄报图片 文字手抄报 电影手抄报 手抄报简单漂亮花边 建党95周年手抄报 简单手抄报花边边框 有关健康的手抄报 健康安全手抄报 关于手抄报的图画