这个style看起来好像不简单,从来没看见过这样的写法,帮你顶
解决方案 »
- selection的一些问题
- js 表格排序并编辑
- 要 "判断" 一个div到底是显示的还是隐藏的该怎么写
- js onmouseout事件
- 如何替换??谢谢
- ExtJs 动态读取多级菜单
- 大家帮我解决一个表单处理的小问题,谢谢
- document.form.paraMeter.value==""有错吗?
- 请教menuNode = menuTree.addItem(treeNode, "N", "fc.gif", menuName)是什么意思?
- 各位大侠:怎样将日文字符转换成unicode编码?
- event.keyCode=13和9各代表什麼意思?
- JavaScript如何实现一个.TXT文件的隐匿上传?
#Text1 {
z-index:19;width:200px;
}
#s2 {
z-index:19;width:200px;
}
#s1 {
position:relative;top:0px;
width:19px; text-align:right; overflow:hidden; z-index:8;
}
#Select1 {
position:relative;
}
</style>
<span id="dfd">
<input id="Text1" type="text" value="" /><span id="s1" onpropertychange="document.all.Select1.options[flag].innerText=this.value;"><select id="Select1" onpropertychange="setValue(this.selectedIndex);this.parentNode.previousSibling.value = this.options[this.selectedIndex].innerText;" style="width:219px">
<!--<span id="s1" onpropertychange="this.value=document.all.Select1.options[flag].innerText;" 这样会有stack overflow at 0-->
<option>Combox test1</option>
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
</select>
</span>
</span><script>
var flag;
window.load=loadit();
function loadit()
{
//alert(document.getElementById("Text1").tagName);
//alert(document.getElementById("s1").firstChild.clientWidth);
//document.getElementById("s1").style.left=document.getElementById("s1").firstChild.clientWidth - 19 ;
document.getElementById("Select1").style.left=18-document.getElementById("Select1").clientWidth;
} function setValue(f)
{
flag = f;
}
</script>
我去掉了也没事,是代码其他地方的问题吧