html
芃蓉蓁蓁
这个作者很懒,什么都没留下…
展开
-
html number输入框限制只能输入正整数或两位小数的正数
number类型输入框限制只能输入正整数或两位小数的正数原创 2023-02-10 15:10:26 · 1041 阅读 · 1 评论 -
CSS将select/option文本居中显示
<select class="year_chose"> <option value="2022">2022</option> <option value="2021">2021</option> <option value="2020">2020</option> <option value="2019">2019</option> <option valu原创 2022-02-23 15:38:51 · 768 阅读 · 0 评论 -
iframe宽度高度自适应
<iframe src="index.html" id ="replaceContent" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" onLoad="iFrameHeight()"></iframe>// iframe自适应宽度高度function iFrameHeight() { var ifm= document.getElementById("replaceContent"); if原创 2021-12-23 18:26:49 · 330 阅读 · 0 评论 -
jquery实现table中tr或ul的li自动向上滚动效果
html:<div class="tbl-body" style="height:85%;overflow: hidden"> <div class="title">访问次数排名</div> <table> <thead> <tr> <td>序号</td> <td>名称</td>原创 2021-06-22 17:06:09 · 2174 阅读 · 0 评论 -
div嵌入其他html页面
<div style="margin-left: 10px; margin-right: 10px" id="app" v-cloak> <iframe id="mainiframe" src="http://www.baidu.com" width="100%" scrolling="auto" onload="changeFrameHeight()" allowtransparency="true" style="background-color:transparent" f原创 2021-06-01 16:18:54 · 2447 阅读 · 0 评论 -
select标签回显
1.<select name="curStatus" > <option value="0">-请选择-</option> <option value="1" <c:if test="${'1' eq curStatus}">selected</c:if> >男</option> <option value="2" <c:if test="${'2' eq curStatus}"&g原创 2021-03-25 15:40:40 · 1474 阅读 · 0 评论 -
设置select 框和checkbox框只读
readonly属性:关联的是页面元素的value属性(例如textbox,设置了readonly就不能修改输入框的文本内容),对select和checkbox不起作用。disabled属性:这个属性的作用是设置页面元素为不可用,即不可进行任何交互操作(包括不可修改value属性、不可修改checked状态等)。但是问题也来了,就是它也不能向后台传递数据了。如需使用可以在表单提交之前,移除这个属性 $(“#s1”).removeAttr(“disabled”);(1)设置select只读:添加onf.原创 2020-11-18 16:34:36 · 2926 阅读 · 0 评论 -
html常用表单元素,按钮
元素描述text文本框textarea文本域password密码域radio单选按钮checkbox复选框submit提交reset重置hidden隐藏域label标签file文件上传image图片select下拉列表原创 2020-07-17 16:39:26 · 223 阅读 · 0 评论 -
点击重置按钮,清空表单所有内容
只要把type设置为reset即可,不需要设置click事件来清空每个输入框内容。<button type="reset" >重置</button>或<input type="reset" value="重置" />原创 2020-07-17 16:24:03 · 8055 阅读 · 2 评论