首页 > 语言 > JavaScript > 正文

js下用层来实现select的title提示属性

2024-05-06 14:11:23
字体:
来源:转载
供稿:网友
代码如下:
<script>
             function opts(selectObj){
                         var optDivs=document.createElement("div");
                         var objTable=document.createElement("table");
                         var objTbody=document.createElement("tbody");
                         optDivs.style.zIndex = "100";
                         objTable.style.zIndex = "100";
                         objTable.width=selectObj.style.width;    
                         objTable.border = "0";
                         objTable.cellPadding = "0";
                         objTable.cellSpacing = "0";
                         objTable.style.paddingLeft = "2";    
                         objTable.style.fontFamily = "Verdana, Arial, Helvetica, sans-serif";

                         var e = selectObj;
                         var absTop = e.offsetTop;
                         var absLeft = e.offsetLeft;
                         var absWidth = e.offsetWidth;
                         var absHeight = e.offsetHeight;
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表

图片精选