最近做了很多前端页面的工作,遇到的一个感觉很头疼的问题在这里记一下: 经常用JS回显单选框,但是明明从页面效果上来看,单选框已经被选中了,可是却不能触发单选框的change事件,取值的时候用某种方法取不能取的选中单选框的值(单选框取值有很多种方法,我的意思是有的能够取到,有的方法取不到). 想了很久,整理出一套看起来很复杂却非常实用的JS回显方法.试验了多种前端框架和浏览器,均好使.假设我们需要给name为gender,value为1的单选框进行回显: $("[name='gender'][va…
js获取单选框的值 var lx= $("input[name='lx']:checked").val();…
问题: 后台在springMVC中使用hibernate-validator做参数校验的时候(validator具体使用方法见GOOGLE),用properties文件配置了校验失败的错误信息.发现回显给前端页面的时候中文错误信息显示乱码. 封装参数的POJO类 public class UserReqBean { @NotNull(message="{user.name.notnull}") private String userName; } ValErrMsg.propertie…
直接复制开用 解决在回显数据的时候会默认聚焦 this.$refs.myQuillEditor.quill.enable(false); setTimeout(() => { this.$refs.myQuillEditor.quill.enable(true); }, 2000);…
组合树(combotree)把选择控件和下拉树结合起来.它与组合框(combobox)相似,不同的是把列表替换成树组件.组合树(combotree)支持带有用于多选的树状态复选框的树. 依赖 combo , tree 用法 从标记创建组合树(combotree). <select id="cc" class="easyui-combotree" style="width:200px;" data-options="url:'get…
用到h5技术 <img id="headimg" src="<%=path%>/resources/images/icon4.png" style="cursor:pointer;" height="90px;" width="95%;">                    <input id="headurladd" type="file&q…
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" > <head> <meta http-equiv="Content-…
<select id="dataselect" class="input-medium" style="width: 20%"> <option value="">请选择</option> <option value="1" <c:if test="${'1' eq dataselect}">selected</c:if>…
    <c:forEach items="${listtest}" var="provinces">        <input type="checkbox" name="map.zffwmc" value="${provinces.CODE}"                  <c:forEach items="${listspfl}" var="…
该功能主要用于业务系统中的登录操作,登录后弹出全屏的业务系统主界面,而不需要工具栏.地址栏.菜单等功能. 之前针对不同浏览器找了无数种方法,包括网上能查到的所有方法,弹出的结果都不理想.结果有的IE6,7,8支持但是IE11不支持,有些火狐支持,chrome不支持. 最后找了很久才找到这个方法:经过测试IE6.IE7.IE8.IE11,Chrome都很理想.唯一360浏览器弹出了新窗口后还是会新建一个空白窗口,太奇葩了. 代码如下: var strStyle = 'height='+screen…