您好,欢迎来到外链网!
当前位置:外链网 » 站长资讯 » 专业问答 » 文章详细 订阅RssFeed

网页在线运行,网页在线运行exe

来源:互联网 浏览:105次 时间:2023-04-08

测试代码

<!Doctype html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="Generator" content="EditPlus?"> <meta name="Author" content=""> <meta name="Keywords" content=""> <meta name="Description" content=""> <title>测试程序</title> </head> <body> <script src="http://code.jquery.com/jquery-1.4.1.js"></script> <script type="text/javascript"> //字数限制 window.onload = function() { //(document) document.getElementById('note').onkeyup = function() { document.getElementById('text-count').innerHTML=this.value.length; } //(jquery) $('#note2').keyup(function() { // var val=$('#note2').val(); // var len=val.length; var len=this.value.length $('#text-count2').text(len); }) } </script> <div> <textarea cols="40" rows="5" id="note" name="note" maxlength="100" value="" οnkeyup="this.value=this.value.substring(0, 100)" placeholder="最多可输入100字"></textarea><span id="text-count" value="">0</span>/100 </div> <div> <textarea cols="40" rows="5" id="note2" name="note2" maxlength="100" value="" οnkeyup="this.value=this.value.substring(0, 100)" placeholder="最多可输入100字"></textarea><span id="text-count2" value="">0</span>/100 </div> </body> </html>


[Ctrl+A 全部选择 提示:你可先修改部分代码,再按运行]

保存代码功能目前只适配IE,若有更好的意见欢迎指出和评论!!!

——实现代码附下篇。。。

转载于:https://www.cnblogs.com/libf/p/7489919.html