ADF 中OnClick的JavaScript的支持问题
ADF 11g不再支持Onclick等JavaScript,而是采用<af:clientListener>来实现诸如删除某条记录的提示框。
实现方式如下:
function confirmDelete() {
if (confirm('Are you sure you want to delete this record?'))
return true;
else
return false;
}
<af:commandLink actionListener="#{bindings.removeRowWithKey.execute}"
action="#{viewCalStatus.deleteCalStatus}" text="Delete">
<af:clientListener method="confirmDelete" type="click"/>
<af:setActionListener from="#{row.rowKeyStr}" to="#{requestScope.calStatusRow}"/>
</af:commandLink>
ADF 中的<af:commandLink>和<af:commandButton>传递参数的方法
<af:commandLink id= “” text= “”><f:param name= “param_name” value= “param_value”/></ af:commandLink> 评论:<af:commandLink>可以采用该方法传递参数,而<af:commandButton>不行。不过可以应用<h: commandButton >代替<af:commandButton>实现参数传递。具体方法如下: <h:commandButton value="更新" action="#{emplBean.edit_action}" id="cb1"> <input type="hidden" name="emplId" value="${emplBean.employee.empno}"/></h:commandButton>
相关文档:
avaScript通过内置的setTimeout函数来完成页面内的定时检查,也是很久以前写的东西了。
之所以想起它来,是因为在和项目组其他成员说该事情的时候,别人竟然嘲笑我说是上个世纪的代码,现在都用WEB2.0了。
<script language="JavaScript" type="text/JavaScript">
//增加系统扫描时间
var v_ ......
转化为Boolean类型
所有JavaScript中的值都能隐式的转化为Boolean类型,比如:
0 == false; // true
1 == true; // true
'' == false // true
null == false // true
但是这些值都不是Boolean类型。
因此当我们使用三个等 ......
版本:DHTML Object Model 返回值:有
语法:
oTextRange = object . createTextRange ()
参数:
无
返回值:
oTextRange : 对象(Element)。如果成功的话返回被建立的 TextRange 对象。
说明:
为 object 建立 TextRange 对象。
使用此 TextRange 对象可以检索和修改 object 内的文本。 TextRange 对� ......
1.如何获取表单<select>域的选择部分的文本?
<form name="a">
<select name="a" size="1" onchange="_sel(this)">
<option value="a">1</option>
<option value="b">2</option>
<option value="c">3</option>
</select>
</form&g ......
设为首页和添加收藏的Javascript代码,兼容性还可以,各种主流浏览器都测试通过了。
function addfavorite(){//加入收藏
if (document.all){
window.external.addFavorite("http://"+document.location.host+"/",document.title);
}else if (window.sidebar){
window.sidebar.addPanel(document.tit ......