注册 | 登录 忘记密码? 51cto首页 | 博客 | 论坛 | 招聘
热点文章 《掌控Windows SErver 2..
 帮助
2010-01-12 17:27:08



2009-12-23 14:17:56



2009-12-23 14:16:06



2009-12-17 14:35:56



2009-12-07 16:55:33



2009-12-07 16:08:00



2009-12-03 18:27:45
DWR  util.js 学习笔记
/********************/

/********************/
util.js包含一些有用的函数function,用于在客户端页面调用.
主要功能如下:



Java代码 复制代码

1、$() 获得页面参数值   
2、addOptions and removeAllOptions 初始化下拉框   
3、addRows and removeAllRows  填充表格   
4、getText  取得text属性值   
5、getValue 取得form表单值   
6、getValues 取得form多个值   
7、onReturn     
8、selectRange   
9、setValue   
10、setValues   
11、toDescriptiveString   
12、useLoadingMessage   
13、Submission box  1、$() 获得页面参数值
2、addOptions and removeAllOptions 初始化下拉框
3、addRows and removeAllRows 填充表格
4、getText 取得text属性值
5、getValue 取得form表单值
6、getValues 取得form多个值
7、onReturn
8、selectRange
9、setValue
10、setValues
11、toDescriptiveString
12、useLoadingMessage
13、Submission box

*********************************************************************
//////////////////////http://blog.163.com/fzfx888//////////////////////////
*********************************************************************



Java代码 复制代码

1、$()函数   
  IE5.0 不支持   
  $ = document.getElementById   
  取得form表单值   
  var name = $("name");  1、$()函数
IE5.0 不支持
$ = document.getElementById
取得form表单值
var name = $("name");
***********************************************************************************
///////////////////////////////////////////////////////////////////////////////////
***********************************************************************************
2、用于填充 select 下拉框 option



Java代码 复制代码

a、如果你想在更新select 时,想保存原来的数据,即在原来的select中添加新的option:   
    var sel = DWRUtil.getValue(id);   
    DWRUtil.removeAllOptions(id);   
    DWRUtil.addOptions(id,...);   
    DWRUtil.setValue(id,sel);   
    demo:比如你想添加一个option:“--请选择--”   
DWRUtil.addOptions(id,["--请选择--"]);    
  
   DWRUtil.addOptions()有5中方式:   a、如果你想在更新select 时,想保存原来的数据,即在原来的select中添加新的option:
var sel = DWRUtil.getValue(id);
DWRUtil.removeAllOptions(id);
DWRUtil.addOptions(id,...);
DWRUtil.setValue(id,sel);
demo:比如你想添加一个option:“--请选择--”

DWRUtil.addOptions(id,["--请选择--"]);

DWRUtil.addOptions()有5中方式:   
 


Java代码



2009-12-03 18:22:46



 <<   1   2   3   4   5   >>   页数 ( 1/22 )