<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head><title><!--{$UUDEV_PAGE_TITLE}--></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script>
$().ready(function(){
	$("#chinesewordunitForm").validate({
		rules: {
			"source_keyword":{
				required : true,
				remote : {
					url : "index.php",
					cache : false,
					data : {
						r : "SiteSet.check_source_keyword",
						source_keyword : function(){
							return $("#source_keyword").val();
						}
					}
				}
			}			
		},
		messages:{
			"source_keyword":{
				required : "关键词不能为空",
				remote : "关键词已存在"
			}			
		},
		errorPlacement: function(error, element){
			$("#span_" + element.attr("id")).html(error).attr("class", "error");
		},
		submitHandler: function(form){
			setDisabled(":button",window.document);
			form.submit();
		},
		errorClass: "invalid",
		success: function(label){
			label.parent().html("&nbsp;").attr("class", "valid");
		},
		onkeyup:false
	});
});
</script>
</head>
<body>
<form id="chinesewordunitForm" action="index.php?r=SiteSet.addchineseword" method="post">
	<input type="hidden" name="action" value="do">
	<table class="tbl_edit" width="100%">
		<tr>
			<td class="td_name">关键词<span class="red">*</span></td>
			<td class="td_content"><input id="source_keyword" name="source_keyword" class="text" maxlength='50'/><span id="span_source_keyword"></span></td>
		</tr>
		<tr>
			<td class="td_name">替换为</td>
			<td class="td_content"><input name="target_keyword" class="text" value="" maxlength='50'/></td>
		</tr>
		<tr>
			<td class="noborder"></td>
			<td class="noborder"><button type="submit" class="butsubmit">提交</button></td>
		</tr>
	</table>
</form>
</body>
</html>