<style>
.i_conts{margin:30px auto; width:320px; 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>例如：19900308，19881224。</p>
<p>你的出生年月日：<input name="date" id="date" maxLength="8" 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('date').value=='')
	{
		alert('出生年月日不能为空！');
		document.getElementById('date').focus();
		return false;
	}

	var form1=document.getElementById('form1');
	form1.submit();
}

</script>