您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

js实现input输入框点击变大缩小

2024/3/27 14:20:43发布18次查看
本文主要和大家分享js实现input输入框点击变大缩小的实例代码,希望能帮助到大家。
一、input输入框点击变大缩小的js代码html中
<style type="text/css"> input[type='text'] { width: 100px; height: 30px; border-radius: 5px; } </style> </head> <body> <p> 标题:<input class="inputtitle" value="" type="text" /> </p> <!-- js响应"内容"输入框变大事件:src="/js/article/change_input.js" --> <p> 内容:<input class="inputcontent" value="" type="text_content" /> </p>
js代码中
$(document).ready(function() { $("input[type='text_content']").focus(function() { $(this).animate({ "width" : "400px", "height" : "70px" }) }).blur(function() { $(this).animate({ "width" : "100px", "height" : "30px" }) }); });
相关推荐:
javascript代码实现input输入框模糊提示功能
js实现点击下拉菜单把选择的内容同步到input输入框内的实例
input输入框中的光标大小显示不一致应该怎么解决
以上就是js实现input输入框点击变大缩小的详细内容。
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product