javascript的不解之处

来源:百度知道 编辑:UC知道 时间:2024/06/07 23:28:53
var but = document.createElement("table")
ComboBoxButton = but ----这个怎么理解
but.button = but ----but.button指的是什么,起什么作用
but.border = 0
but.cellPadding = 0
but.cellSpacing = 0
but.style.position = "absolute"
but.width = 16
if (mode == 0)
but.height = 17
else
but.height = 6 + index
but.bgColor = "#D4D0C8"
but.style.borderLeft = '1px ridge'
but.style.borderRight = '1px solid #333333'
but.style.borderTop = '1px ridge'
but.style.borderBottom = '1px solid #333333'
but.style.fontSize = '1px'
but.style.left = left
but.style.top = top
but.style.zIndex = 10

col = but.insertRow().insertCell()
col.button = but
col.width = '100%'
col.height = '100%'
col.vAlign = 'middle'
var butx = document.createElement("table&qu

ComboBoxButton = but ----这是个引用的变量赋值,在js里除了文本,数字所有的复制都是引用赋值.js里没有使用var声明的变量一律作为全局变量

but.button = but ----but.button 可以说是自定义的属性,执行这个之后,可以用but.button 引用but

看不懂哈