<form action="link.manage.php" id="form1" name="form1" method="post" style="padding-bottom:20px">
	<input type="hidden" name="action" id="action" value="set_save" />
    <table width="680" class="from_table">
	  <tr>
	  <th><tpl> $langLinkImageWidth </tpl>:</th>
	      <td width="530"><input type="text" size="10" name="pic_width" id="pic_width" class="txtinput_short" value="<tpl> $link_array.pic_width </tpl>" /> px
		 <label style="display:none" for="pic_width" class="wrong" metaDone="true" generated="true"></label>		  </td></tr><tr>
		  <th><tpl> $langLinkImageHigh </tpl>:</th>
   	      <td width="530"><input type="text" size="10" name="pic_height" id="pic_height" class="txtinput_short" value="<tpl> $link_array.pic_height </tpl>" /> px
		  <label style="display:none" for="pic_height" class="wrong" metaDone="true" generated="true"></label>		  </td>

  </table>
  <div class="table-5-bottom"><div class="p-left-2"><span class="btn_left">
            <input type="submit" value="<tpl> $langLinkSubmit </tpl>" class="btn_submit"/></span></div></div>
</form>
<script>
$(document).ready(function() {	
	
	var options = {
		beforeSubmit:  function(){showLoading(showSaveText);},
		success:       function(msg){
							hideLoading();
							showMessage(msg.message,msg.type);
						},
		type:      'post',
		dataType:  'json'
	};
	
	//对表单做的验证定义
	$("#form1").validate({
		errorClass: "wrong",
		rules: {
			pic_width: {required:true,number:true},
			pic_height: {required:true,number:true}
		},
		messages: {
			pic_width: {required:"<tpl> $langLinkImageWidthIsNumber </tpl>",number:"<tpl> $langLinkImageWidthIsNumber </tpl>"},
			pic_height: {required:"<tpl> $langLinkImageHighIsNumber </tpl>",number:"<tpl> $langLinkImageHighIsNumber </tpl>"}
		},
		submitHandler: function() {
			$('#form1').ajaxSubmit(options);
		}
	});
});	
</script>