<style>
.i_conts{margin:30px auto; width:250px; border-top:2px dashed #ddd; margin-bottom:200px;}
.i_conts p{ color:#f60; padding:10px 0; text-align:center; }
.i_conts p.send{cursor:pointer;}
</style>
<div class="i_conts">
<form action="./" method="post" id="form1" name="form1">
<p>尊姓大名：<input name="t_nick" id="t_nick" maxLength="6" value="<?=$_COOKIE['v_nick']?>" style="width:120px;font-size:15px;" /><span style="font-size:13px; margin-left:10px;">*名字</span></p>

<p>Q Q号码：<input name="qqhm" id="qqhm" maxLength="10" value="" style="width:120px;font-size:15px;" onKeyUp="value=value.replace(/\D/g,'')" onafterpaste="value=value.replace(/\D/g,'')" /><span style="font-size:13px; margin-left:10px;">*数字</span></p>
</form>
<p class="send"><img src="http://app.qpic.cn/mblogpic/05f902135224a3463866/2000" width="160" height="32" alt="查看结果，并发送微博" title="查看结果，并发送微博" onclick="on_submit();" /></p>
</div>
<script>
function on_submit()
{
	if(document.getElementById('qqhm').value=='')
	{
		alert('QQ号码不能为空');
		document.getElementById('qqhm').focus();
		return false;
	}
	if(document.getElementById('t_nick').value=='')
	{
		alert('名字不能为空');
		document.getElementById('t_nick').focus();
		return false;
	}
	if (document.getElementById('qqhm').value.length <5) {
        alert("QQ号码不能少于5位数");
        document.getElementById("qqhm").focus();
        return false
    }
	var form1=document.getElementById('form1');
	form1.submit();
}

</script>