自己看,勿喷
$('input:radio[name="sex"]:checked').val();------------》单选取值
var chk_value =[];
var chk_title =[];
//debugger
$('input[name="xh"]:checked').each(function(){
chk_value.push($(this).val());
chk_title.push($(this).attr("title"));
}); ---------------》多选取值
select option----》$("#ww").val()......$("#ww").find("option:selected").text();取text值
$("ww").val(2)----->默认选中value为2的option
window.opener.父页面的方法------------->适用于弹出框里操作父页面js里的方法
window.open("sss.jsp");
window.location.href="http://www.jb51.net";
$("button").click(function(){ $("li").each(function(){ alert($(this).text()) }); });
var a[]=new array[];
a.push();
a.push();
a.push();
public String execute() throws Exception { String root = ServletActionContext.getServletContext().getRealPath("/upload"); for(int i = 0; i < file.size(); i++) { InputStream is = new FileInputStream(file.get(i)); OutputStream os = new FileOutputStream(new File(root, fileFileName.get(i))); byte[] buffer = new byte[500]; @SuppressWarnings("unused") int length = 0; while(-1 != (length = is.read(buffer, 0, buffer.length))) { os.write(buffer); } os.close(); is.close(); }