
<script type="text/javascript"> 
$(document).ready(function(){
	$("#intro").keyup(function(){
		var curLength=$("#intro").val().length;	
		if(curLength>=50){
			var num=$("#intro").val().substr(0,50);
			$("#intro").val(num);
			alert("超过字数限制，多出的字将被截断！" );
		}
		else{
			$("#textCount").text(50-$("#intro").val().length)
		}
	})
})
</script>
<div class="page">
	<div class="pageContent">
		<form method="post" action="?action=smsmail&do=messreply" class="pageForm required-validate" onsubmit="return validateCallback(this, dialogAjaxDone)">
		<input type="hidden" name="tid" value="<?php echo $this->_var['row']['id']; ?>" />
			<div class="pageFormContent" layoutH="56">
				<div class="unit">
					<label>收件人：</label>
					<input name="address" type="hidden" size="30" class="required" value="<?php echo $this->_var['row']['sender']; ?>"/>
                    <input name="addressname" type="text" size="30" class="required" value="<?php echo $this->_var['row']['sender_txt']; ?>" readonly/>
				</div>
				<div class="unit">
					<label>发件内容：</label>
					还可以输入<span id="textCount" style="color:#f00;">50</span>个字
					<textarea rows="8" cols="50" name="intro" class="required" tools="mini" id="intro"></textarea>
				</div>
			</div>
			<div class="formBar">
				<ul>
					<li><div class="buttonActive"><div class="buttonContent"><button type="submit">发送</button></div></div></li>
				</ul>
			</div>
		</form>
	</div>
</div>