• 【Asp.Net】document.getElementById 的属性介绍


    document.getElementById("id").style.xxx可以设置指定ID的控件的属性值。

    主要支持以下一些属性设置:

    盒子标签和属性对照
    CSS语法(不区分大小写) JavaScript语法(区分大小写)
    border border
    border-bottom borderBottom
    border-bottom-color borderBottomColor
    border-bottom-style borderBottomStyle
    border-bottom-width borderBottomWidth
    border-color borderColor
    border-left borderLeft
    border-left-color borderLeftColor
    border-left-style borderLeftStyle
    border-left-width borderLeftWidth
    border-right borderRight
    border-right-color borderRightColor
    border-right-style borderRightStyle
    border-right-width borderRightWidth
    border-style borderStyle
    border-top borderTop
    border-top-color borderTopColor
    border-top-style borderTopStyle
    border-top-width borderTopWidth
    border-width borderWidth
    clear clear
    float floatStyle
    margin margin
    margin-bottom marginBottom
    margin-left marginLeft
    margin-right marginRight
    margin-top marginTop
    padding padding
    padding-bottom paddingBottom
    padding-left paddingLeft
    padding-right paddingRight
    padding-top paddingTop
    颜色和背景标签和属性对照
    CSS 语法(不区分大小写) JavaScript 语法(区分大小写)
    background background
    background-attachment backgroundAttachment
    background-color backgroundColor
    background-image backgroundImage
    background-position backgroundPosition
    background-repeat backgroundRepeat
    color color
     
    样式标签和属性对照
    CSS语法(不区分大小写) JavaScript 语法(区分大小写)
    display display
    list-style-type listStyleType
    list-style-image listStyleImage
    list-style-position listStylePosition
    list-style listStyle
    white-space whiteSpace
     
    文字样式标签和属性对照
    CSS 语法(不区分大小写) JavaScript 语法(区分大小写)
    font font
    font-family fontFamily
    font-size fontSize
    font-style fontStyle
    font-variant fontVariant
    font-weight fontWeight
     
    文本标签和属性对照
    CSS 语法(不区分大小写) JavaScript 语法(区分大小写)
    letter-spacing letterSpacing
    line-break lineBreak
    line-height lineHeight
    text-align textAlign
    text-decoration textDecoration
    text-indent textIndent
    text-justify textJustify
    text-transform textTransform
    vertical-align

    verticalAlign

    使用如下:

    document.getElementById("panel1").style.backgroundColor='#ff0000';

  • 相关阅读:
    Python+Flask使用蓝图
    Python+selenium实现自动登录
    Python+Flask做个简单的表单提交程序
    第一个Flask程序
    PHP读取IIS网站列表
    在IIS7上导出所有应用程序池的方法 批量域名绑定
    Delphi判断一个字符串是否全是相同的数字
    WeTest六周年 | 匠心不改 初心不变
    WeTest压测大师链路性能监控 | 一站式压测、监控解决方案,开放免费体验预约
    WeTest自助压测1折起,最低1分钱参与Q币抽奖
  • 原文地址:https://www.cnblogs.com/mqxs/p/3718400.html
Copyright © 2020-2023  润新知