<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<script src="jquery-1.4.4.js" type="text/javascript"></script>
<script language="javascript">
$(document).ready(function(){
var val="";
$(".sourcecheck").each(function(){
$(this).click(function(){
if($(this).attr('checked')==true)
{
val+=$(this).attr("value")+'+';
}
else
{
if(val.indexOf($(this).attr("value")) >=0)
{
val=val.replace($(this).attr("value")+'+',"");
}
}
$("#txtConsult").val(val);
});
});
});
</script>
</head>
<body>
<input id="txtConsult" type="text" maxlength="50" readonly="readonly" class="txtHInput"/>
<input type="checkbox" class="sourcecheck" name="sourcecheck" value="电话" />电话
<input type="checkbox" class="sourcecheck" name="sourcecheck" value="网站咨询" />网站咨询
<input type="checkbox" class="sourcecheck" name="sourcecheck" value="短信" />短信
<input type="checkbox" class="sourcecheck" name="sourcecheck" value="本院" />本院
<input type="checkbox" class="sourcecheck" name="sourcecheck" value="活动现场" />活动现场
</body>
</html>