摘要:
从Request对象中可以获取各种路径信息,以下例子:假设请求的页面是index.jsp,项目是WebDemo,则在index.jsp中获取有关request对象的各种路径信息如下String path = request.getContextPath();String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";String remoteAddress=request.getRemo 阅读全文
摘要:
一对一的XML配置文件<mapper namespace="dao.mapper.ClassMapper"><resultMap id="classResultMap" type="Classes"><id property="classid" column="classid1" /><result property="classname" column="classname" /><result pr 阅读全文
摘要:
<div style="position:absolute; top:20%; left:30%;"> <textarea style=" width:200px; height:100px;" onpropertychange="onKeyDown(this,200)" ></textarea> <br /> <span>已输入字符: </span> <span>0/200</span></div><script lan 阅读全文
摘要:
获取一组radio被选中项的值var item = $('input[@name=items][@checked]').val();获取select被选中项的文本var item = $("select[@name=items] option[@selected]").text();select下拉框的第二个元素为当前选中值$('#select_id')[0].selectedIndex = 1;radio单选组的第二个元素为当前选中值$('input[@name=items]').get(1).checked = true; 阅读全文