易截截图软件、单文件、免安装、纯绿色、仅160KB

Javascript操作下拉框的常用方法

 function AddDropDownList(id,fatherCtl)
{
    if(!document.getElementById(id))
    {
        var ddl = document.createElement('select');
        ddl.setAttribute("id",id);   
        if(fatherCtl&&document.getElementById(fatherCtl))
            document.getElementById(fatherCtl).appendChild(ddl);
        else
            document.body.appendChild(ddl);
     }
}
//删除指定的下拉框
function RemoveDropDownList(id)
{
      var ctl = document.getElementById(id);
      if(ctl)
        ctl.parentNode.removeChild(ctl);
}
//给下拉框添加选项
function AddDDDLOption(id,text,value)
{
    var ctl = document.getElementById(id);
    if(ctl)
    {
        ctl.options[ctl.options.length]   =   new   Option(text,value);  
    }
}
//删除所有选项
function RemoveAllDDLOptions(id)
{
    var ctl = document.getElementById(id);
    if(ctl)
    {
        ctl.options.length=0;
    }
}
//删除指定索引的选项
function RemoveDDLOption(id,index)
{
    var ctl=document.getElementById(id);
    if(ctl && ctl.options[index])
    {  &n


相关文档:

JavaScript 获取对象的高度和宽度详细说明

scrollHeight: 获取对象的滚动高度。
scrollLeft:设置或获取位于对象左边界和窗口中目前可见内容的最左端之间的距离
scrollTop:设置或获取位于对象最顶端和窗口中可见内容的最顶端之间的距离
scrollWidth:获取对象的滚动宽度
offsetHeight:获取对象相对于版面或由父坐标 offsetParent 属性指定的父坐标的高度
offsetL ......

javascript 的 UI 框架

MochaUI
MochaUI is a web applications user interface library built on the Mootools JavaScript framework.
网址:http://mochaui.com/
演示:http://mochaui.com/demo/
授权方式:MIT License
 
jquery UI
网址:http://ui.jquery.com/
演示:http://ui.jquery.com/demos
授权方式:MIT and GPL lic ......

javascript事件详细说明

 原文网址:http://www.ccvita.com/?s=onbeforepaste
javascript事件列表解说javascript事件列表解说
事件 浏览器支持 解说
一般事件 onclick IE3、N2 鼠标点击时触发此事件
ondblclick IE4、N4 鼠标双击时触发此事件
onmousedown IE4、N4 按下鼠标时触发此事件
onmouseup IE4、N4 鼠标按下后松开鼠标时触发此事 ......

用javascript操纵GridView中CheckBox的两个常用技巧

  using System;
using System.Data;
public partial class CheckBox:System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
//生成DataTable并添加相应的列
DataTable dt = new DataTable();
dt.Columns.Add("ID");
dt.Columns.Add("Autho ......

JavaScript checkbox全选与全不选的切换

  function select_all(){
var paras = document.getElementsByTagName("input");//全选checkbox
if(document.getElementById("all").checked==true){
for(var i=0; i<paras.length; i++){
var name = paras[i].getAttribute("name") //单选checkbox的name均d ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号