您的位置:首页 > 产品设计 > UI/UE

easyui-combo个人实例

2015-10-18 08:00 441 查看
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<link rel="stylesheet" type="text/css"
href="<%=path%>/easyui/themes/default/easyui.css">
<link rel="stylesheet" type="text/css"
href="<%=path%>/easyui/themes/icon.css">
<link rel="stylesheet" type="text/css" href="<%=path%>/easyui/demo.css">
<script type="text/javascript"
src="<%=path%>/easyui/jquery-1.7.2.min.js"></script>
<script type="text/javascript"
src="<%=path%>/easyui/jquery.easyui.min.js"></script>
<script type="text/javascript">
$(function(){
$("#cc").combo({
required:true,
eidtable:false,
width:'200px'
});
$("#sp").appendTo($("#cc").combo('panel'));
$("#sp input").click(function(){
var v = $(this).val();
var s = $(this).next('span').text();
$("#cc").combo('setValue',v).combo('setText',s).combo('hidePanel');
});
});
</script>
</head>
<body>
<select id="cc"></select>
<div id="sp">
<input type="radio" name="lang" value="01"><span>C#</span><br>
<input type="radio" name="lang" value="02"><span>JAVA</span><br>
<input type="radio" name="lang" value="03"><span>数据结构</span><br>
<input type="radio" name="lang" value="04"><span>算法</span><br>
<input type="radio" name="lang" value="05"><span>C++</span><br>
</div>
</body>
</html>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: