标签:js
js常用功能代码(持续更新):
1,--折叠与展开
<input id="btnDisplay" type="button" class="baocun2" value="添加" onclick="changeDisplay()" /> <script type="text/javascript"> function changeDisplay() { var helloDivObj = $("#addressdiv"); var buttonObj = $("#btnDisplay"); var val = buttonObj.attr("value"); if (val == "隐藏") { helloDivObj.hide(); buttonObj.attr("value", "添加"); } else { helloDivObj.show(); buttonObj.attr("value", "隐藏"); } } </script>
标签:js
原文地址:http://blog.csdn.net/baidu_25310663/article/details/46417511