<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>例如：刘恺威，杨幂。</p>
<p>你的姓名：<input type="text" name="name1" id="name1" maxLength="3" value="" style="width:120px;font-size:15px;"  /><span style="font-size:13px; margin-left:10px;">*最多3字</span></p>
<p>Ta的姓名：<input type="text" name="name2" id="name2" maxLength="3" value="" style="width:120px;font-size:15px;"  /><span style="font-size:13px; margin-left:10px;">*最多3字</span></p>

<p><input type="checkbox" name="is_hide" id="is_hide" onclick="this.checked;" value="1" />
        <label for="is_hide">结果图中隐藏Ta的名字</label></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('name1').value=='')
	{
		alert('你的姓名不能为空！');
		document.getElementById('name1').focus();
		return false;
	}
	if(document.getElementById('name2').value=='')
	{
		alert('Ta的姓名不能为空！');
		document.getElementById('name2').focus();
		return false;
	}

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

</script>