首页 | 源码下载 | 网站模板 | 网页特效 | 广告代码 | 网页素材 | 字体下载 | 书库 | 站长工具
会员投稿 投稿指南 RSS订阅
当前位置:主页>网络编程>jsp教程>资讯:在JSP中对select和textarea读取、赋值的实例

在JSP中对select和textarea读取、赋值的实例

www.jz123.cn  2010-10-08   来源:   中国建站    责任编辑(袁袁)    我要投递新闻

以下为引用的内容:
<%@ page language="java" import="java.util.*" pageEncoding="gbk"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<SCRIPT type=text/javascript>

function clearContent(obj){
obj.value = "";
}
function addname(obj1,obj2)
{
var oSelected = document.getElementById(obj2);
var selectedValue = oSelected.options[oSelected.selectedIndex].value;
window.alert(selectedValue);
var oarea=document.getElementById(obj1).value;
window.alert("1");
window.alert(oarea);

document.getElementById(obj1).value=selectedValue+","+oarea;

}

</SCRIPT>
<SCRIPT>
var menu_id=0;

function setPointer(theRow, thePointerColor,menu_id_over)
{
if(menu_id!=menu_id_over)
theRow.bgColor = thePointerColor;
}

function view_menu1()
{
window.location="car-managelist.jsp";
menu_id=1;
menu_1.bgColor='#D9E8FF';
menu_2.bgColor='#DDDDDD';
}

function view_menu2()
{
window.location="car-applylist.jsp";
menu_id=2;
menu_1.bgColor='#DDDDDD';
menu_2.bgColor='#D9E8FF';
}

</SCRIPT>



上一篇:JSP生成数字验证码教程 下一篇:Ext2.0本地模式动态修改combobox选择项

评论总数:0 [ 查看全部 ] 网友评论


关于我们隐私版权广告服务友情链接联系我们网站地图