网站导航网学 原创论文 原创专题 网站设计 最新系统 原创论文 论文降重 发表论文 论文发表 UI设计定制 论文答辩PPT格式排版 期刊发表 论文专题
返回网学首页
网学原创论文
最新论文 推荐专题 热门论文 论文专题
当前位置: 网学 > 设计资源 > .Net编程 > 正文

js中一些常用的基本方法

论文降重修改服务、格式排版等 获取论文 论文降重及排版 论文发表 相关服务
function getObj(id){ return document.getElementById(id); }         //获取对象

function getValue(id){ return document.getElementById(id).value; } //获取值

function setValue(id, value){ document.getElementById(id).value = value; } //设置值

function setText(id, text){ document.getElementById(id).innerHTML = text; }

function getAttributeValue(id, attributeName)

{return document.getElementById(id).getAttribute(attributeName);}        //取得某属性的值。

function setAttributeValue(id, attributeName, value)

{return document.getElementById(id).setAttribute(attributeName,value);}  //为某属性設置值。

function getStatus(id){ return !(document.getElementById(id).disabled); }//获取状态,是否禁用

function setStatus(id, status){ document.getElementById(id).disabled = !status; } //设置状态

function setEnable(id){ document.getElementById(id).disabled = false; }//设置状态是否禁用

function setDisable(id){ document.getElementById(id).disabled = true; } //設置狀態為禁用

function setFocus(id){ document.getElementById(id).focus(); }//設置為當前焦點

function getSelectedIndex(id){ return document.getElementById(id).selectedIndex; }  

//取得當時選取項索引值

function setSelectedIndex(id, index){ document.getElementById(id).selectedIndex = index; }  

//設置當時選取項索引值

function addGrid(gridId){ igtbl_addNew(gridId, 0); } //新增一列空白(UltraWebGrid控件用)

function selectObj(id){ document.getElementById(id).select();}//選中對像,ddl沒有select方法

//WebDateChooser日期控件

function getDateValue(id){ return igdrp_getComboById(id).getValue(); }

function setDateValue(id,value){ return igdrp_getComboById(id).setValue(value); }

function setDateFocus(id){ return igdrp_getComboById(id).focus(); }
设为首页 | 加入收藏 | 网学首页 | 原创论文 | 计算机原创
版权所有 网学网 [Myeducs.cn] 您电脑的分辨率是 像素
Copyright 2008-2020 myeducs.Cn www.myeducs.Cn All Rights Reserved 湘ICP备09003080号 常年法律顾问:王律师