日期控件只显示年月
<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中的常用JavaScript知识点,并结合`mainJs.js`这个文件名称,推测并解析可能包含的代码和实践应用。 1. 可访问性API(Accessibility API): AOM的核心是可访问性API,它允许...
"AOM中IE、Firefox兼容Enter代替Tab的Javascript"这个主题关注的是如何在不同的浏览器环境中,尤其是IE和Firefox中,使用JavaScript实现按下回车键(Enter)时模拟Tab键的效果,以实现元素间的焦点切换。 首先,我们...
AOM 通过engine.vbs 启动UFT。
标题"AOM初体验(一)"以及描述中提到的工程打包下载,暗示了这是一个关于应用开发和集成环境的讨论,特别是涉及到AOM(可能是Apusic Application Object Model,一种中间件平台)的使用。标签"源码"和"工具"进一步...
使用QTP的automation object model,可以对QTP进行自动化编程,从而自动对QTP进行选项设置、自动运行测试(或组件),而无需使用QTP界面手工进行这些操作。 如果要重复多次的完成同一项工作任务,或重复多次运行同一...
描述中提到这是"google仓库资源",这意味着aom项目可能托管在Google的某个代码存储库中,比如Google GitHub仓库,这通常意味着该项目具有较高的可靠性和活跃的社区支持。"亲测可用"的声明则表示至少有用户已经成功...
在AOM相关压缩包中,可能包含以下内容: 1. **源码**:AOMedia的AV1编码器或解码器的源代码,开发者可以通过阅读和修改源代码来学习其工作原理,或者为项目添加新功能。 2. **文档**:关于AOMedia架构、设计原则和...
AOM(Academy of Motion Picture Arts and Sciences)是一个与电影技术相关的组织,而在此上下文中,它似乎指的是一个特定的Java项目或库。"AOM java原代码下载"的标题表明我们正在讨论的是该组织的Java源代码,可能...
"errata"通常用于标识软件发布中的错误或修正,这意味着这个压缩包可能包含了针对aomedia(aom)v1.0.0版本的一些修复或改进。"1"可能是修正的序列号,表示这是第一次更新。 描述中提到"aom-v1.0.0.errata.1.tar.gz...
AOM金蝶控件开发指南,入门,供大家学习
在这个过程中,`aom-v1.0.0.errata.1.tar.gz`是一个重要的组件,它是Google开放媒体联盟(Alliance for Open Media, AOMedia)的AV1编码器开源实现——AOMedia Video 1(AV1)的一个版本。AV1是一种高效、开放标准的...
海洋沉积物甲烷厌氧氧化(AOM)作用是一个涉及甲烷和硫酸盐的生物地球化学过程,甲烷作为一种温室气体,在海洋沉积物中通过与硫酸盐还原菌作用被转化为二氧化碳或碳酸盐,同时硫酸盐作为电子受体被还原为硫化物。...
标题 "aom.zip_3344aom_aom.avcom_av1_h264_zip" 暗示了这是一个与视频编码相关的压缩文件,其中包含了AV1编码器的源代码,可能还有与H264编码的对比或转换相关的资料。描述 "av1 codec source open c++" 明确指出这...
【X-AOM权识区块链新经济 - 泛AI时代投资多元的解决方案】 X-AOM权识区块链新经济项目旨在利用区块链...随着5G、大数据、AI等新型基础设施的建设,以及国家对数字经济发展政策的支持,X-AOM有望成为行业中的重要力量。
传统经济中,数据通常被看作是公司的资产,而在X-AOM的方案中,数据被视为所有参与者的共享资源。通过区块链技术,数据的所有权和使用权得以明确,参与者贡献数据的同时,也能分享由此产生的收益。 4. **投资多元...
为了解决这一问题,声光调制器(AOM)被广泛应用于激光冷却实验中以实现对激光频率的有效控制。 当使用AOM扫描激光频率时,第一级衍射光束的角度也会随之变化,这是因为光束衍射角度是调制频率的函数。虽然对于某些...
,而且,AOM虽然提供了5种皮肤给我们切换,但是从2.0开始,连自带的另四种皮肤都不怎么完善了,为此我专门检查了operamasks-impl.jar源码中的vista皮肤,发现似乎是本身自带的图片都缺少了,所以显示并不完全,很多...