📄 score_005finfo_jsp.java
字号:
out.write("\t\t \t\t\t\t\t\t$tr.find('input[@name=name]').val(values[0]);\r\n");
out.write("\t\t \t\t\t\t\t\t$tr.find('input[@name=point]').val(values[1]);\r\n");
out.write("\t\t \t\t\t\t\t\t$tr.find('input[@name=default]').attr('value','1');\r\n");
out.write("\t\t \t\t\t\t\t}\r\n");
out.write("\t\t \t\t\t\t\t$tr.css('display','');\r\n");
out.write("\t\t \t\t\t\t\t$('#table').append($tr);\t \t\t\t\t\t\r\n");
out.write("\t\t \t\t\t\t}\r\n");
out.write("\t\t \t\t\t}\r\n");
out.write("\t \t\t\t}\r\n");
out.write("\t \t\t\t\r\n");
out.write("\t \t\t\t//在生成一行的同时判定radio的选中与否时存在问题,不能一步到位的给一个选项填好值并让他选中,\r\n");
out.write("\t \t\t\t//可能是因为在处理没有选中行的时候被选中行还没有被创建出来,radio的个数只有一个而已,这个时候没法让radio不选中\r\n");
out.write("\t \t\t\t//下面的方式就是在所有的行都被创建好之后,通过判定radio的值是否为1,如果为一就选中否则不选。\r\n");
out.write("\t \t\t\t$.each($('#table').find('input[@name=default]'),function (){\r\n");
out.write("\t \t\t\t\tif($(this).val()==1){\r\n");
out.write("\t \t\t\t\t\t$(this).attr('checked','checked');\r\n");
out.write("\t \t\t\t\t}\r\n");
out.write("\t \t\t\t});\r\n");
out.write("\t \t\t\t\r\n");
out.write("\t \t\t}\r\n");
out.write("\t \t}else if(type==2){//处理填空\r\n");
out.write("\t \t\t$('#typeValue').html(\"以设置分数来<font color='red'>填空</font>的方式\");\r\n");
out.write("\t \t\t$('#tiankong').css('display','');\r\n");
out.write("\t \t\tif(value != ''){\r\n");
out.write("\t \t\t\tvar items = value.split('-');\r\n");
out.write("\t \t\t\t$('#tiankong').find('input[@id=from]').attr('value',items[0]);\r\n");
out.write("\t \t\t\t$('#tiankong').find('input[@id=to]').attr('value',items[1]);\r\n");
out.write("\t \t\t}\r\n");
out.write("\t \t}\r\n");
out.write("\t \t\r\n");
out.write("\t \taddInputEffect();\r\n");
out.write("\t });\t\r\n");
out.write("\t \r\n");
out.write("\tfunction deleteRow(obj){\r\n");
out.write("\t\t$(obj).parent().parent().remove();\r\n");
out.write("\t}\r\n");
out.write("\t\r\n");
out.write("\t function insRow(obj){\r\n");
out.write("\t\t$tr = $('#template').clone();\r\n");
out.write("\t\t$tr.attr('name','xuanze');\r\n");
out.write("\t\t$tr.css('display','');\r\n");
out.write("\t\t$('#table').append($tr);\r\n");
out.write("\t}\r\n");
out.write("\t\r\n");
out.write("\tfunction changeradio(){\r\n");
out.write("\t\r\n");
out.write("\t}\r\n");
out.write("\t\r\n");
out.write("\tfunction save(){\r\n");
out.write("\t\tvar win = window.dialogArguments;\r\n");
out.write("\t\tvar id = \"");
if (_jspx_meth_s_005fproperty_005f2(_jspx_page_context))
return;
out.write("\";\r\n");
out.write("\t\tvar value ='';\r\n");
out.write("\t\t\r\n");
out.write("\t\tif(type==1){\r\n");
out.write("\t\t\tvar flag = true;\r\n");
out.write("\t\t\t$('#table').find('tr').each(function (index){\r\n");
out.write("\t\t\t\tif(flag){\r\n");
out.write("\t\t\t\t\tif($(this).attr('name')=='xuanze'){\r\n");
out.write("\t\t\t\t\t\t$(this).find('input').each(function (i){\r\n");
out.write("\t\t\t\t\t\t\tif($(this).attr('name')=='name'){\r\n");
out.write("\t\t\t\t\t\t\t\tif(isNull($(this).val())){\r\n");
out.write("\t\t\t\t\t\t\t\t\talert('选项名不能为空');\r\n");
out.write("\t\t\t\t\t\t\t\t\t$(this).select();\r\n");
out.write("\t\t\t\t\t\t\t\t\t$(this).focus();\r\n");
out.write("\t\t\t\t\t\t\t\t\tflag = false;\r\n");
out.write("\t\t\t\t\t\t\t\t\treturn;\r\n");
out.write("\t\t\t\t\t\t\t\t}else{\r\n");
out.write("\t\t\t\t\t\t\t\t\tvalue = value + $(this).val();\r\n");
out.write("\t\t\t\t\t\t\t\t}\r\n");
out.write("\t\t\t\t\t\t\t}\r\n");
out.write("\t\t\t\t\t\t\tif($(this).attr('name')=='point'){\r\n");
out.write("\t\t\t\t\t\t\t\tif(isNull($(this).val())||!isNum($(this).val())){\r\n");
out.write("\t\t\t\t\t\t\t\t\talert('选项值为空或格式不正确');\r\n");
out.write("\t\t\t\t\t\t\t\t\t$(this).select();\r\n");
out.write("\t\t\t\t\t\t\t\t\t$(this).focus();\r\n");
out.write("\t\t\t\t\t\t\t\t\tflag = false;\r\n");
out.write("\t\t\t\t\t\t\t\t\treturn;\r\n");
out.write("\t\t\t\t\t\t\t\t}else{\r\n");
out.write("\t\t\t\t\t\t\t\t\tvalue = value+'=' + $(this).val();\r\n");
out.write("\t\t\t\t\t\t\t\t}\r\n");
out.write("\t\t\t\t\t\t\t}\r\n");
out.write("\t\t\t\t\t\t\tif($(this).attr('name')=='default'){\r\n");
out.write("\t\t\t\t\t\t\t\tif($(this).attr('checked')==true){\r\n");
out.write("\t\t\t\t\t\t\t\t\tvalue = value + '=!;'\r\n");
out.write("\t\t\t\t\t\t\t\t}else{\r\n");
out.write("\t\t\t\t\t\t\t\t\tvalue = value + ';';\r\n");
out.write("\t\t\t\t\t\t\t\t}\r\n");
out.write("\t\t\t\t\t\t\t}\r\n");
out.write("\t\t\t\t\t\t});\r\n");
out.write("\t\t\t\t\t}\r\n");
out.write("\t\t\t\t}\r\n");
out.write("\t\t\t});\r\n");
out.write("\t\t\tif(flag){\r\n");
out.write("\t\t\t\twin.document.getElementById(id).value = value;\r\n");
out.write("\t\t\t\talert('保存成功!');\r\n");
out.write("\t\t\t\twindow.close();\r\n");
out.write("\t\t\t}\r\n");
out.write("\t\t}else if(type==2){\r\n");
out.write("\t\t\t//alert('from:'+$('#from').val());\r\n");
out.write("\t\t\t//alert('to :'+$('#to').val());\r\n");
out.write("\t\t\tif(isNull($('#from').val())||!isNum($('#from').val())){\r\n");
out.write("\t\t\t\talert('分值下限值为空或格式不正确');\r\n");
out.write("\t\t\t\t$('#from').select();\r\n");
out.write("\t\t\t\t$('#from').focus();\r\n");
out.write("\t\t\t\treturn ;\r\n");
out.write("\t\t\t}else if(isNull($('#to').val())||!isNum($('#to').val())){\r\n");
out.write("\t\t\t\talert('分值上限值为空或格式不正确');\r\n");
out.write("\t\t\t\t$('#to').select();\r\n");
out.write("\t\t\t\t$('#to').focus();\r\n");
out.write("\t\t\t\treturn ;\r\n");
out.write("\t\t\t}else if(parseInt($('#from').val()) > parseInt($('#to').val())){\r\n");
out.write("\t\t\t\talert('分值下限值超出上限值');\r\n");
out.write("\t\t\t\t$('#to').select();\r\n");
out.write("\t\t\t\t$('#to').focus();\r\n");
out.write("\t\t\t\treturn ;\r\n");
out.write("\t\t\t}else{\r\n");
out.write("\t\t\t\tvalue = value + $('#from').val() + '-' + $('#to').val();\r\n");
out.write("\t\t\t\twin.document.getElementById(id).value = value;\r\n");
out.write("\t\t\t\talert('保存成功!');\r\n");
out.write("\t\t\t\twindow.close();\r\n");
out.write("\t\t\t}\r\n");
out.write("\t\t}else{\r\n");
out.write("\t\t\talert('error');\r\n");
out.write("\t\t}\r\n");
out.write("\t}\r\n");
out.write("-->\t\r\n");
out.write("</script>\r\n");
} catch (Throwable t) {
if (!(t instanceof SkipPageException)){
out = _jspx_out;
if (out != null && out.getBufferSize() != 0)
out.clearBuffer();
if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
}
} finally {
if (_jspxFactory != null) _jspxFactory.releasePageContext(_jspx_page_context);
}
}
private boolean _jspx_meth_s_005fproperty_005f0(PageContext _jspx_page_context)
throws Throwable {
PageContext pageContext = _jspx_page_context;
JspWriter out = _jspx_page_context.getOut();
// s:property
org.apache.struts2.views.jsp.PropertyTag _jspx_th_s_005fproperty_005f0 = (org.apache.struts2.views.jsp.PropertyTag) _005fjspx_005ftagPool_005fs_005fproperty_005fvalue_005fnobody.get(org.apache.struts2.views.jsp.PropertyTag.class);
_jspx_th_s_005fproperty_005f0.setPageContext(_jspx_page_context);
_jspx_th_s_005fproperty_005f0.setParent(null);
_jspx_th_s_005fproperty_005f0.setValue("#parameters.typeValue");
int _jspx_eval_s_005fproperty_005f0 = _jspx_th_s_005fproperty_005f0.doStartTag();
if (_jspx_th_s_005fproperty_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005fs_005fproperty_005fvalue_005fnobody.reuse(_jspx_th_s_005fproperty_005f0);
return true;
}
_005fjspx_005ftagPool_005fs_005fproperty_005fvalue_005fnobody.reuse(_jspx_th_s_005fproperty_005f0);
return false;
}
private boolean _jspx_meth_s_005fproperty_005f1(PageContext _jspx_page_context)
throws Throwable {
PageContext pageContext = _jspx_page_context;
JspWriter out = _jspx_page_context.getOut();
// s:property
org.apache.struts2.views.jsp.PropertyTag _jspx_th_s_005fproperty_005f1 = (org.apache.struts2.views.jsp.PropertyTag) _005fjspx_005ftagPool_005fs_005fproperty_005fvalue_005fnobody.get(org.apache.struts2.views.jsp.PropertyTag.class);
_jspx_th_s_005fproperty_005f1.setPageContext(_jspx_page_context);
_jspx_th_s_005fproperty_005f1.setParent(null);
_jspx_th_s_005fproperty_005f1.setValue("#parameters.id");
int _jspx_eval_s_005fproperty_005f1 = _jspx_th_s_005fproperty_005f1.doStartTag();
if (_jspx_th_s_005fproperty_005f1.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005fs_005fproperty_005fvalue_005fnobody.reuse(_jspx_th_s_005fproperty_005f1);
return true;
}
_005fjspx_005ftagPool_005fs_005fproperty_005fvalue_005fnobody.reuse(_jspx_th_s_005fproperty_005f1);
return false;
}
private boolean _jspx_meth_s_005fproperty_005f2(PageContext _jspx_page_context)
throws Throwable {
PageContext pageContext = _jspx_page_context;
JspWriter out = _jspx_page_context.getOut();
// s:property
org.apache.struts2.views.jsp.PropertyTag _jspx_th_s_005fproperty_005f2 = (org.apache.struts2.views.jsp.PropertyTag) _005fjspx_005ftagPool_005fs_005fproperty_005fvalue_005fnobody.get(org.apache.struts2.views.jsp.PropertyTag.class);
_jspx_th_s_005fproperty_005f2.setPageContext(_jspx_page_context);
_jspx_th_s_005fproperty_005f2.setParent(null);
_jspx_th_s_005fproperty_005f2.setValue("#parameters.id");
int _jspx_eval_s_005fproperty_005f2 = _jspx_th_s_005fproperty_005f2.doStartTag();
if (_jspx_th_s_005fproperty_005f2.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_005fjspx_005ftagPool_005fs_005fproperty_005fvalue_005fnobody.reuse(_jspx_th_s_005fproperty_005f2);
return true;
}
_005fjspx_005ftagPool_005fs_005fproperty_005fvalue_005fnobody.reuse(_jspx_th_s_005fproperty_005f2);
return false;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -