在一些特定场合,需要动态创建类,比如创建表单,就会用到type动态创建类,举个例子: class Person(object): def __init__(self,name,age): self.name = name self.age = age p = Person("aiden",22) print(type(p)) print(type(Person)) def __init__(self,name,age): self.name = name self.age = age…
今天遇到这么一个需求,携带一个编号一个名字跳转到另一个JSP页面,直接页面跳转(get携带数据)的话不太安全,于是想到到后台转发一下. 第一种:直接以表单提交方式的进行 JS代码: var form = $("<form action='"+contextPath+"/trainacontentType_forwardToAddTraincontent.action"+"' method='post'></form>")…
function exportExcel() { var merchantName = $('#merchantName').val(); var merchantNo = $('#merchantNo').val(); var orderNo = $('#orderNo').val(); var phone = $('#phone').val(); var orderStatus = $('#orderStatusCombobox').combobox('getValue'); var pai…
document.body.appendChild(jForm) won't work because jForm is not a dom element, it is a jQuery object so add the below script before jForm.submit(); jForm.appendTo('body') function loadPage(url, projectName) { var jForm = $('<form></form>', {…