样式表
新建样式表(common)
- mainxpage–标题–样式–导出(xspInput)–
新建主题(myTheme)
-
<resource> <content-type>text/css</content-type> <href>common.css</href> </resource> <control> <name>InputField.EditBox</name> <property> <name>styleClass</name> <value>xspInputFieldEditBoxOne</value> </property> </control>
帮助
获取编辑框内容
- var e=window.document.getElementById("#{id:inputText1}");
alert(e.value); - var e=window.document.getElementById(“view:_id1:inputText1”);
alert(e.value);
给编辑框赋值
-
var e=window.document.getElementById("#{id:inputText2}");
e.value=“hehe”; -
if(window.confirm(“are you sure?”)==true){
var e=window.document.getElementById("#{id:inputText2}");
e.value=“heihei”;}
服务器端alert
- view.postScript(“alert(‘服务器alert:postScript’)”);
给计算字段赋值
-
添加计算字段–值--高级–定制–会话作用域(sessionST)
-
添加计算字段–值--高级–定制–视图作用域(viewST)
-
添加按钮(scope)–onclick服务器(
viewScope.viewST=“viewST”;
sessionScope.sessionST=“sessionST”;
)