日期控件只显示年月
<w:dateField id="date4" format="yyyy-MM -dd" width="80" onblur="test();"/>
<w:script>
function test()
{
var mydate = document.getElementById('myform:date4').value;
document.getElementById('myform:date4').value = mydate.substring(0,7);
}
</w:script>
js控制
<w:script>
function test() {
alert('1110: ' + password.disabled);
alert('1111: ');
alert('1111: ' + document.getElementById('form2:birthday_outer').disabled);
document.getElementById('form2:sex').disabled = 'true';
document.getElementById('form2:sex_outer').disabled = 'true';
//隐藏下拉框和label
//document.getElementById('form2:sex').style.display = 'none';
//document.getElementById('form2:sex_outer').style.display = 'none';
//document.getElementById('form2:sex_label').style.display = 'none';
//document.getElementById('form2:birthday').disabled = true;
document.getElementById('form2:birthday_label').disabled = 'true';
document.getElementById('form2:birthday').style.display = 'none';
document.getElementById('form2:birthday_outer').style.display = 'none';
document.getElementById('form2:birthday_label').style.display = 'none';
//birthday.el.dom.readOnly = true;
birthday.el.dom.disabled = true;
//birthday.el.dom.disabled = false;
//只读和不可用
password.el.dom.readOnly = true;
password.el.dom.disabled = true;
//不可用
//password.setDisabled('true');
//隐藏
//password.setVisible(false);
}
</w:script>
<h:outputLabel id="sex_label" value="性别:"/>
<w:combo id="sex" value="male">
<f:selectItem itemLabel="男" itemValue="male"/>
<f:selectItem itemLabel="女" itemValue="female"/>
</w:combo>
<h:outputLabel id="birthday_label" value="生日:"/>
<w:dateField id="birthday" jsvar="birthday" value="1988-09-09"/>
转换器的使用
<script>
//<![CDATA[
function formatAlertType(v, m,r){
if (v == 1) {
m.attr="style='color:#000000;'";
v = "提示";
//alert('hello');
//alert(r);
//alert(r.get('alertmsg'));
r.data.alertmsg = "测试改变其他列的值";
//alert(r.data.alertmsg);
return v;
}
else if (v == 2) {
m.attr="style='color:#0000ff;'";
v = "告警";
return v;
}
if (v == '3') {
m.attr="style='color:#0066ff;'";
v = "严重告警";
return v;
}
if (v == '4') {
m.attr="style='color:red;'";
v = "危险";
return v;
}
else {
m.attr="style='color:green'";
v = "其他";
}
return v;
}
function formatAreaid(v, m){
if (v == 'hz') {
m.attr="style='color:red;'";
v = "惠州";
} else {
m.attr="style='color:green'";
}
return v;
}
function formatMachid(v, m){
if (v == 'ap1') {
m.attr="style='color:red;'";
v = "机器1";
}
else {
m.attr="style='color:green'";
}
return v;
}
function formatAlertMsg(v, m,r){
//alert(r.get('alerttype'));
if(4 == r.get('alerttype')||6 == r.get('alerttype'))
{
m.attr="style='color:red;'";
}
else {
m.attr="style='color:green'";
}
return v;
}
function formatHomepage(v) {
return '<a href="' + v + '" target=_blank>' + v + '</a>';
}
function formatLogoUrl(v){
return '<img src="' + v + '"/>';
}
//]]>
//<![CDATA[
function update(btn) {
if (atimer.scheduled && !atimer.cancelled) {
atimer.cancel();
btn.setText("开始实时告警监控");
} else {
atimer.schedule();
btn.setText("停止监控");
}
return false;
}
//]]>
</script>
<w:dataGrid id="grid" paged="false" rows="20" height="450" width="1030">
<w:outputColumn id="areaid" clientFormatter="formatAreaid" width="150" align="center" sortable="true" header="地市名" />
<w:outputColumn id="machid" header="机器名" clientFormatter="formatMachid"/>
<w:outputColumn id="alerttime" width="200" header="告警时间" />
<w:outputColumn id="alerttype" header="告警类型" clientFormatter="formatAlertType"/>
<w:outputColumn id="alertmsg" clientFormatter="formatAlertMsg" name="alertmsg" width="400" header="告警信息" />
</w:dataGrid>
分享到:
相关推荐
AOM中的常用JavaScriptAOM中的常用JavaScript
AOM中IE、Firefox兼容Enter代替Tab的Javascript
AOM 通过engine.vbs 启动UFT。
使用QTP的automation object model,可以对QTP进行自动化编程,从而自动对QTP进行选项设置、自动运行测试(或组件),而无需使用QTP界面手工进行这些操作。 如果要重复多次的完成同一项工作任务,或重复多次运行同一...
AOM金蝶控件开发指南,入门,供大家学习
google仓库资源aom-v1.0.0.errata.1.tar.gz包,亲测可用。
NULL 博文链接:https://mfkvfn.iteye.com/blog/1756233
aom-v1.0.0.errata.1.tar.gz 编译VLC等需要使用。google仓库资源。解压后使用。
AOM 源代码文件,AOM源代码文件,AOM2.1源代码下载
编译android VLC时,需要的组件:aom-v1.0.0.errata.1.tar.gz 将该包放置在vlc-android/vlc/contrib/tarballs目录下
整个工程打包下载 博文链接:https://mmm.iteye.com/blog/169018
,而且,AOM虽然提供了5种皮肤给我们切换,但是从2.0开始,连自带的另四种皮肤都不怎么完善了,为此我专门检查了operamasks-impl.jar源码中的vista皮肤,发现似乎是本身自带的图片都缺少了,所以显示并不完全,很多...
X-AOM权识区块链新经济 -泛AI时代投资多元的解决方案.pdf
X-AOM_权识区块链新经济 -泛AI时代投资多元的解决方案(英语).pdf
https://aomedia.googlesource.com/aom/ Aom-av1 编解码器 github的镜像-源码
google源 aom vlc
av1 codec source open c++