40 lines
1.2 KiB
Plaintext
40 lines
1.2 KiB
Plaintext
<%!
|
||
/*
|
||
函数描述:通过相应的参数设置输入界面的展现形式
|
||
参数说明:
|
||
String sStyle 文本框类型 0:Input 1:textarea
|
||
String sMethodInput 传入Method的值 1:display;2:save;3:preview;4:export
|
||
String sControlName 文本框的名称和样式
|
||
String sContent 文本内容
|
||
*/
|
||
public String myOutPut(String sStyle,String sMethodInput,String sControlName,String sContent){
|
||
if(sMethodInput.equals("1")||sMethodInput.equals("2")){ //1:display;2:save
|
||
if(sStyle.equals("1")) //need htmledit(textarea)
|
||
return "<textarea "+sControlName+">"+sContent+"</textarea>";
|
||
else //else input
|
||
return "<input type=text "+sControlName+" value='"+sContent+"' >";
|
||
}else //3:preview;4:export
|
||
return sContent;
|
||
}
|
||
|
||
public String getUnitData(String unitname,String[][] data){
|
||
for(int i=0;i<data.length;i++){
|
||
if(data[i][0].equals(unitname)){
|
||
return data[i][1];
|
||
}
|
||
}
|
||
return "";
|
||
}
|
||
|
||
/*
|
||
函数描述:通过相应的参数设置是否显示提示信息项
|
||
参数说明:
|
||
String sMethodInput 传入Method的值 1:display;2:save;3:preview;4:export
|
||
*/
|
||
public String myShowTips(String sMethodInput){
|
||
if(sMethodInput.equals("1")) //1:display
|
||
return " style='display:block' ";
|
||
else
|
||
return " style='display:none' ";
|
||
}
|
||
%> |