http://www.w3school.com.cn/xmldom/met_document_createelement.asp
var newText = document.createElement('input');
newText.style.cssText = 'display:block;width:<%=iWidth%><%=Input[i][26]%>;'; //20130821
newText.name = '<%=tableField%>[' + thisRow+']';
newText.id = '<%=tableField%>' + thisRow;
newText.type='<%=siType[0]%>';
if ('<%=tableField%>'=='<%=dbfName%>.Datetimer'){newText.value=milliseconds = new Date().getTime();} //generate datetimer
newText.onkeypress=function (event){};
newText.onclick = function(event) {};
newText.className="gridDblClick"; //20130904
newText.ondblclick = function(event){
$('#abc_frame').prop('src', 'input.jsp?input=employeeInput.txt&config=employeeInputConfig.txt&key=emploeeid&keyValue='+Xdata[thisRowNo]);
$('#clicker').click();
//window.open('input.jsp?input=employeeInput.txt&config=employeeInputConfig.txt&key=emploeeid&keyValue='+Xdata[thisRowNo], '_self');
//messagebox('#employeeEdit',900,600,'Send');
//http://192.168.10.80:8080/hr/input.jsp?input=employeeInput.txt&config=employeeInputConfig.txt&key=emploeeid&keyValue=7
//alert(Xdata[thisRowNo]);
//openNewWindow("input.jsp?input=employeeInput.txt&config=employeeInputConfig.txt&key=emploeeid&keyValue="+Xdata[thisRowNo],200,300);
};//2013083017 20130902 working
newText.onfocus = function(event) {SelectAll(this.id);
thisID='<%=tableField%>' + thisRow;
thisDBFName="<%=dbfName%>";
nextField='<%=nextField%>' + thisRow;
enterField='<%=nextField%>' + thisRow;
prevField='<%=PreviouField%>' + thisRow;
upperField='<%=tableField%>' + ((thisRow*1)-1);
lowerField='<%=tableField%>' +((thisRow*1)+1) ;
thisTable="tableName<%=sID%>";
thisRowNo=this.parentNode.parentNode.rowIndex;
gRowNo=thisRowNo;
sayRecno(thisRowNo);
highlightGridRow("tableName<%=sID%>");
//setGridBackgroundColor("C", this,this.id,this.parentNode.parentNode.rowIndex,thisTable,"");
};
//newText.onclick = function(event) {SelectAll(this.id); sayRecno(this.parentNode.parentNode.rowIndex);};
<%if (MODE.equals("LIST")){%>newText.setAttribute("readOnly","true"); //20130904 <%}%>
沒有留言:
張貼留言