惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

P
Palo Alto Networks Blog
T
The Blog of Author Tim Ferriss
Engineering at Meta
Engineering at Meta
博客园_首页
博客园 - 三生石上(FineUI控件)
G
Google Developers Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
博客园 - 【当耐特】
Microsoft Security Blog
Microsoft Security Blog
P
Privacy & Cybersecurity Law Blog
Recent Commits to openclaw:main
Recent Commits to openclaw:main
S
Secure Thoughts
爱范儿
爱范儿
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
H
Help Net Security
The Cloudflare Blog
Recorded Future
Recorded Future
Attack and Defense Labs
Attack and Defense Labs
J
Java Code Geeks
O
OpenAI News
T
Tor Project blog
B
Blog RSS Feed
D
Darknet – Hacking Tools, Hacker News & Cyber Security
PCI Perspectives
PCI Perspectives
V
Visual Studio Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
A
About on SuperTechFans
www.infosecurity-magazine.com
www.infosecurity-magazine.com
W
WeLiveSecurity
Cyberwarzone
Cyberwarzone
云风的 BLOG
云风的 BLOG
Security Latest
Security Latest
S
Schneier on Security
Know Your Adversary
Know Your Adversary
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
V
Vulnerabilities – Threatpost
D
DataBreaches.Net
宝玉的分享
宝玉的分享
T
Troy Hunt's Blog
V
V2EX
Cisco Talos Blog
Cisco Talos Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
美团技术团队
Application and Cybersecurity Blog
Application and Cybersecurity Blog
Latest news
Latest news
量子位
Microsoft Azure Blog
Microsoft Azure Blog

博客园 - HQT

类似 MSN 的提示窗口 asp.net 1.1 部分按钮不能提交 - canNOT submit issue .NET 2.0 和1.1 共用时,出现"服务器应用程序不可用"的错误. - HQT 检索 COM 类工厂中 CLSID 为 {00024500-0000-0000-C000-000000000046} 的组件时失败,原因是出现以下错误: 80070005 Oracle 数字转换为英文的函数 取中英文数字混合的长度 ( C# + ORACLE ) - HQT 找不到可安装的 ISAM -- ConnectionString 问题.... .net 使用 ACCESS 库一个小问题 C# 中转换 vb.net 换行符等Ascii 字符 SQLServer 安装过程出错 安装程序配置服务器失败 (解决篇) Web 横向打印 Excel 小写金额转大写 获取Excel合并单元格数据-通用方法 关于 Excel 的结束进程的方法讨论 如何判断Excel单元格是否为合并单元格 DNN-HttpModule.UrlRewrite( url重写 ) Xceed Components DNN 4.0 安装 together2.0 for vs.net2003 下载
可随文本变化而出现不同选择项的文本框+下拉列表选择
HQT · 2005-12-20 · via 博客园 - HQT

<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style>
.table1
{background-color:white;FONT-FAMILY: Courier New, Courier;font-size:12px}
.td_out
{FONT-FAMILY: Courier New, Courier;font-size:12px;color:#000000;height:15px;border:1 solid #ffffff;}
.td_over
{FONT-FAMILY: Courier New, Courier;font-size:12px;cursor:default;background-color:#3366cc;border:1 solid #000000;color:#ffffff;height:15px}
.slv
{vertical-align:bottom;FONT-FAMILY: Courier New, Courier;font-size:12px;border-left-width:0;border-top-width:0;border-bottom-width:0;border-right:0 solid #000000;vertical-align:middle;height:18px;color:#000000;}
.down
{position:relative;left:-2px;font-size:11px;vertical-align:middle;width:16;height:16;color:#2050b0;background-color:#D0DFF7;border:1 solid #9fA3Ce;writing-mode:tb-rl;font-weight:bold;
}

.seldiv
{
position
:absolute;z-index:1000;overflow-x:hidden;border-left:1 solid #000000;border-bottom:1 solid #000000;border-right:1 solid #000000;
SCROLLBAR-FACE-COLOR
: #d0dff7; 
SCROLLBAR-HIGHLIGHT-COLOR
: #d0dff7; 
SCROLLBAR-SHADOW-COLOR
: #FFFFFF; 
SCROLLBAR-3DLIGHT-COLOR
: #FFFFFF; 
SCROLLBAR-ARROW-COLOR
: #ffffff; 
SCROLLBAR-TRACK-COLOR
: #ffffff; 
SCROLLBAR-DARKSHADOW-COLOR
: #d0dff7;}

</style>
<script language="javascript">
document.onclick
=hiddenDiv;
function getDivCount() {
var arr=document.all; 
re
=0;
for (i=0;i<arr.length;i++{
  str
=arr[i].id;  
  
if (str.indexOf("ZfDiv_")==0{   
   re
++;  
  }

}
 
return re;
}


function getI(ObjId) {//取得objId的最后一位数字
for (i=0;i<ObjId.length;i++{
  
if (ObjId.charAt(i)=="_"return ObjId.substr(i+1,ObjId.length-1);
}

return 0;
}


function select_edit(TextObj){//鼠标经过高亮度 
TextObj.focus();
//TextObj.select();
}


function checkValue(ID){   
var sl=document.all["ZfText_"+ID]; 
var sv=document.all["ZfDiv_"+ID];
var da=document.all["ZfData_"+ID];   
sv.style.display
='';

for(i=0;i<da.rows.length;i++)da.rows[i].style.display='';

for(i=0;i<da.rows.length;i++){
  
if(da.rows[i].cells[0].innerText.indexOf(sl.value)!=0)da.rows[i].style.display='none';
  getPosition(ID);
}
 
}


function getL(e){
var l=e.offsetLeft;
while(e=e.offsetParent){
  l
+=e.offsetLeft;
}

return l;
}

function getT(e){
var t=e.offsetTop;
while(e=e.offsetParent){
  t
+=e.offsetTop;
}

return t;
}


function getPosition(ID)
var sv=document.all["ZfDiv_"+ID];
var sl=document.all["ZfText_"+ID];
var spn=document.all["ZfSpan_"+ID];
var da=document.getElementById("ZfData_"+ID);
sv.style.pixelWidth
=spn.offsetWidth;
da.style.pixelWidth
=sv.offsetWidth;
sv.style.pixelLeft
=getL(spn);
sv.style.pixelTop
=getT(spn)+sl.offsetHeight+3;
if(da.offsetHeight>200){
  sv.style.pixelHeight
=200;
  sv.style.overflowY
='scroll';
}

else {
  sv.style.pixelHeight
=da.offsetHeight;
  sv.style.overflowY
='hidden';
}

}


function dropDown(ID)
var sv=document.all["ZfDiv_"+ID];
var tb=document.all["ZfData_"+ID];

if(sv.style.display=='none'){  
  sv.style.display
='';  
  
for(i=0;i<tb.rows.length;i++)tb.rows[i].style.display=''
  getPosition(ID);  
}
 else {  
  sv.style.display
='none';
}

}
//下拉摸拟层

function hiddenDiv(){
var o=window.event.srcElement.id;
var tb ;
var sv ;
if(o==""{
  
for (j=0;j<getDivCount();j++{
   tb
=document.getElementById('ZfData_'+j);
   sv
=document.getElementById('ZfDiv_'+j);   
   
for(i=0;i<tb.rows.length;i++) tb.rows[i].style.display='';
   sv.style.display
='none';   
  }

  
}


}
//隐藏模拟层


function setValue(obj){
var i=getI(obj.parentElement.parentElement.parentElement.id);
//alert(obj.parentElement.parentElement.parentElement.id);

var sl=document.all["ZfText_"+i];
var sv=document.all['ZfDiv_'+i];
sl.value
=obj.innerText;
sv.style.display
='none';
//sldIndex=obj.parentElement.rowIndex;
}
//给文本框赋值

function over(obj){
obj.className
="td_over";
obj.title
=obj.innerText;
obj.focus();
}
//鼠标经过变色

function out(obj){
obj.className
="td_out";
}
//鼠标离开还原

function String.prototype.Trim(){
return this.replace(/(^\s*)|(\s*$)/g,'');
}
//自定义去空格函数Trim()


//增加list的接口,ID表示该组控件是页面中的第几个
function add(v,ID){
var sv=document.all['ZfDiv_'+ID];
if(!v.Trim()){return;}
var tb=document.all['ZfData_'+ID];
var c=tb.insertRow(tb.rows.length).insertCell();
c.innerHTML
='<nobr>'+v.Trim()+'</nobr>';
c.onmouseover
=new Function("over(this)");
c.onmouseout
=new Function("out(this)");
c.onclick
=new Function("setValue(this)");
c.className
="td_out";
v
='';
}

//增加inpnubox的接口,在页面中产生一个inputbox控件,下拉列表为空
function addText(name,DefValue) {
var i=getDivCount();
//alert(name);
//
alert(DefValue);
document.write('<span id="ZfSpan_'+i+'" style="border:1 solid #9CA0CB">');
document.write('
<input type="text" value="'+DefValue+'" name="'+name+'" id="ZfText_'+i+'" class="slv" onmouseover="select_edit(this)"  onkeyup="checkValue('+i+')">');
document.write('
<input type="button" id="ZfDrop_'+i+'" value=">" onclick="this.hideFocus=true;dropDown('+i+');" class="down" ></span>');
document.write('
<div id="ZfDiv_'+i+'" class="seldiv" style="display:none;"><table id="ZfData_'+i+'" onselectstart="return false" border="0"  cellspacing="0" cellpadding="0" class="table1"></table></div>');
}

addText('name1','a');
add(
"1247",0);
add(
"1234",0);
</script>
</head>
</html>

转自: http://www.supercss.com/default.asp?href=http://www.supercss.com/User/BBScenter/c5-0-4-1091-0-1-1.htm 做了部分修改