<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>
<script src="http://files-ns.perfectworld.com/common/portal/www/js/jquery-1.3.2.min.js" type="text/javascript"></script>
<script>
$(function(){
$('#myBtn').bind("click",function(){ alert('bind 事件'); });
var a=$("select[name=class] option:selected'").text();
alert(a);
var b=$("select[name=class1]");
//$("<option value='1'>1111</option>").appendTo(b);//
b.append(a);//
var item=$('input[name=items][checked]').val();
alert(item);
})
</script>
<body>
<input type='button' id='myBtn' value="点我看看">
<input type="radio" name="items">a<input type="radio" name="items" checked="checked" value="hello">b<input type="radio" name="items" >c<input type="radio" name="items">d
<select name="class" ><option value="1">1</option><option value="你好" selected="selected">2</option><option value="1">3</option></select>
<select name="class1" id="select"></select>
</body>
</html>
loading