jsp 选择一个id后怎么自动选择name
<%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8"pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ include file="taglib.jsp"%>
<%@ page import="com.zzdx.bean.CrCapitalinfo"%>
<%
Object obj = request.getAttribute("list");
List<CrCapitalinfo> list = null;
if(obj == null){
list = new ArrayList<CrCapitalinfo>();
}else{
list = (List<CrCapitalinfo>)obj;
}
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>main</title>
<link rel="stylesheet" rev="stylesheet" href="../css/style.css" type="text/css" media="all" />
<script language="JavaScript" type="text/javascript">
function tishi()
{
var a=confirm('数据库中保存有该人员基本信息,您可以修改或保留该信息。');
if(a!=true)return false;
window.open("冲突页.htm","","depended=0,alwaysRaised=1,width=800,height=400,location=0,menubar=0,resizable=0,scrollbars=0,status=0,易做图=0");
}
function check()
{
document.getElementById("aa").style.display="";
}
function link(){
alert('保存成功!');
document.getElementById("fom").action="xuqiumingxi.htm";
document.getElementById("fom").submit();
}
</script>
<style type="text/css">
<!--
.atten {font-size:12px;font-weight:normal;color:#F00;}
-->
</style>
</head>
<body class="ContentBody">
<html:form action="/addCrcap.do?method=2" method="post">
<div class="MainDiv">
<table width="99%" border="0" cellpadding="0" cellspacing="0" class="CContent">
<tr>
<th class="tablestyle_title" >资产负债表添加页面</th>
</tr>
<tr>
<td class="CPanel">
<table border="0" cellpadding="0" cellspacing="0" style="width:100%">
<tr><td align="left">
<input type="button" name="Submit" value="保存" class="button" onclick="alert('保存成功!');"/>
<input type="button" name="Submit2" value="返回" class="button" onclick="window.history.go(-1);"/>
</td></tr>
<TR>
<TD width="100%">
<fieldset style="height:100%;">
<legend>添加任务</legend>
<table border="0" cellpadding="2" cellspacing="1" style="width:100%">
<tr>
<td nowrap align="right">客户号:</td>
<td><select name="cifno" >
<option selected="selected">==请选择==</option>
<% for(CrCapitalinfo m:list) {
%>
<option value="<%=m.getCifno()%>"><%=m.getCifno()%></option>
<% }%>
</select></td>
<td align="right">客户中文名:</td>
<td><input name="cifname" id="Input" class="text" style="width:154px"/></td>
</tr --------------------编程问答-------------------- 具体是什么?代码一堆你也不提示,很少人给你这样看的。最好你在代码里标出来看看啊! --------------------编程问答-------------------- 自动选择什么?ajax?我做过一个springmvc的好像可以! --------------------编程问答-------------------- 是不是要做一个级联的selete啊 --------------------编程问答-------------------- 选中查询出来的客户号自动选择客户名 --------------------编程问答-------------------- 可以在option上写一个onchange将所需要的客户名传过去,在指定的位置显示就好了
补充:Java , Web 开发