<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>印章饰花</title>
</head>
<script language="JavaScript">
<!--
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
// -->
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_showHideLayers() { //v3.0
var i,p,v,obj,args=MM_showHideLayers.arguments;
for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
obj.visibility=v; }
} function selectvalue(str)
{
document.all.T1.value=str;
}
//-->
</script>
<body>
<table>
<td width="89" align="center" height="35">印章饰花:</td>
<td onMouseOver="MM_showHideLayers('HousingMenu','','show','ChargerMenu','','inherit')" onMouseOut="MM_showHideLayers('HousingMenu','','hide','ChargerMenu','','inherit')" width="38" height="35">
<div class="menu2" style="width: 76; height: 13"><div align="center"><input type="text" name="T1" size="10" value="请选择"> </div>
<div id="HousingMenu" style="height: 124; left: 191; overflow: auto; position: absolute; top: 15; width: 74; z-index: 5; visibility: hidden">
<table width="55" cellpadding="0" bgcolor="#E8967D" cellspacing="0">
<tr onclick="selectvalue('五角')">
<td class="menu2" height="20" width="20"></td>
<td class="menu2" height="20" width="35">五角</td>
</tr>
<tr onclick="selectvalue('圆花')">
<td class="menu2" height="20" width="20"></td>
<td class="menu2" height="20" width="35">圆花</td>
</tr>
<tr onclick="selectvalue('三角')">
<td class="menu2" height="20" width="20"></td>
<td class="menu2" height="20" width="35">三角</td>
</tr>
<tr onclick="selectvalue('棱角')">
<td class="menu2" height="20" width="20"></td>
<td class="menu2" height="20" width="35">棱角</td>
</tr>
<tr onclick="selectvalue('棱角')">
<td class="menu2" height="20" width="20"></td>
<td class="menu2" height="20" width="35">棱角</td>
</tr>
<tr onclick="selectvalue('棱角')">
<td class="menu2" height="20" width="20"></td>
<td class="menu2" height="20" width="35">棱角</td>
</tr>
<tr onclick="selectvalue('棱角')">
<td class="menu2" height="20" width="20"></td>
<td class="menu2" height="20" width="35">棱角</td>
</tr>
<tr onclick="selectvalue('棱角')">
<td class="menu2" height="20" width="20"></td>
<td class="menu2" height="20" width="35">棱角</td>
</tr>
</table>
</div>
</div>
</table>
<p> </p>
<p> </p>
<p>把鼠标放到请选择上,出现下拉框,我想点击下拉框中的选项后出现在文本框中,把请选择替换掉,请指教!</p>
</body>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>印章饰花</title>
</head>
<script language="JavaScript">
<!--
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
// -->
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_showHideLayers() { //v3.0
var i,p,v,obj,args=MM_showHideLayers.arguments;
for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
obj.visibility=v; }
} function selectvalue(str)
{
document.all.T1.value=str;
}
//-->
</script>
<body>
<table>
<td width="89" align="center" height="35">印章饰花:</td>
<td onMouseOver="MM_showHideLayers('HousingMenu','','show','ChargerMenu','','inherit')" onMouseOut="MM_showHideLayers('HousingMenu','','hide','ChargerMenu','','inherit')" width="38" height="35">
<div class="menu2" style="width: 76; height: 13"><div align="center"><input type="text" name="T1" size="10" value="请选择"> </div>
<div id="HousingMenu" style="height: 124; left: 191; overflow: auto; position: absolute; top: 15; width: 74; z-index: 5; visibility: hidden">
<table width="55" cellpadding="0" bgcolor="#E8967D" cellspacing="0">
<tr onclick="selectvalue('五角')">
<td class="menu2" height="20" width="20"></td>
<td class="menu2" height="20" width="35">五角</td>
</tr>
<tr onclick="selectvalue('圆花')">
<td class="menu2" height="20" width="20"></td>
<td class="menu2" height="20" width="35">圆花</td>
</tr>
<tr onclick="selectvalue('三角')">
<td class="menu2" height="20" width="20"></td>
<td class="menu2" height="20" width="35">三角</td>
</tr>
<tr onclick="selectvalue('棱角')">
<td class="menu2" height="20" width="20"></td>
<td class="menu2" height="20" width="35">棱角</td>
</tr>
<tr onclick="selectvalue('棱角')">
<td class="menu2" height="20" width="20"></td>
<td class="menu2" height="20" width="35">棱角</td>
</tr>
<tr onclick="selectvalue('棱角')">
<td class="menu2" height="20" width="20"></td>
<td class="menu2" height="20" width="35">棱角</td>
</tr>
<tr onclick="selectvalue('棱角')">
<td class="menu2" height="20" width="20"></td>
<td class="menu2" height="20" width="35">棱角</td>
</tr>
<tr onclick="selectvalue('棱角')">
<td class="menu2" height="20" width="20"></td>
<td class="menu2" height="20" width="35">棱角</td>
</tr>
</table>
</div>
</div>
</table>
<p> </p>
<p> </p>
<p>把鼠标放到请选择上,出现下拉框,我想点击下拉框中的选项后出现在文本框中,把请选择替换掉,请指教!</p>
</body>
解决方案 »
- jquery ajax问题
- list1.style.display = "block";对象不支持此属性或方法
- 高人指点 看jquery源码的一些基础问题
- 在 IE 里不能 table.appendChild()
- 请问怎么对html某个对象进行属性操作
- javascripte里数据库查询出来的数据保存到一个参数里,asp里怎么调用啊?
- 怎样实现图片定位在页面的一个固定位置!
- 请教检测表单域中值的方法
- 求以下Javascript代码:弹出一个密码输入框,输入内容为密文
- 就没有人知道吗,怎么在网页上用Javascript实现本地文件的保存打开
- radio与select的联用。
- 请问如何动态获得浏览器的高度?
缺少对象,再请帮忙
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>印章饰花</title>
</head>
<script language="JavaScript">
var selectHtml = "<select name=\"seltn\" onchange=\"dosel();\">" ;
selectHtml += "<option value=\"v1\">五角</option>" ;
selectHtml += "<option value=\"v2\">圆花</option>" ;
selectHtml += "<option value=\"v3\">三角</option>" ;
selectHtml += "<option value=\"v4\">棱角</option>" ;
selectHtml += "</select>" ;
var textHtml = "<input type=\"text\" name=\"T1\" size=\"10\" onclick=\"disselect();\" value=\"请选择\">" ;
function disselect(){
document.all["divn"].innerHTML=selectHtml;
for (i=0;i<document.all["seltn"].length;i++){
if (document.all["seltn"].options[i].text==document.all["midd"].value){
document.all["seltn"].options[i].selected =true;
break;
}
}
} function distext(){
document.all["divn"].innerHTML=textHtml;
}function dosel(){
document.all["midd"].value=document.all["seltn"].options[document.all["seltn"].selectedIndex].text ;
distext();
document.all["T1"].value=document.all["midd"].value ;}
</script>
<body>
<table>
<td width="89" align="center" height="35">印章饰花:</td>
<input type="hidden" name="midd">
<td onMouseOver="" onMouseOut="" width="38" height="35">
<div class="menu2" style="width: 76; height: 13"><div id="divn" align="center"><input type="text" name="T1" size="10" onclick="disselect();" value="请选择"> </div>
<div id="HousingMenu" style="height: 124; left: 191; overflow: auto; position: absolute; top: 15; width: 74; z-index: 5; visibility: hidden">
<table width="55" cellpadding="0" bgcolor="#E8967D" cellspacing="0">
</table>
</div>
</div>
</table>
<p> </p>
<p> </p>
<p>把鼠标放到请选择上,出现下拉框,我想点击下拉框中的选项后出现在文本框中,把请选择替换掉,请指教!</p>
</body>
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
你现在用的不是真的下拉框,换用了下拉框后,点击下拉框后,document.文本框.value = document.下拉框.options[document.下拉框.selectedIndex].text 就行了。。