<?php echo form_open('login/signin') ?>
<p>用户名:<?php echo form_input('name','','id="name"') ?></p><div id="ninput"></div>
<p><?php echo form_submit('submit','登陆','id="submit"')?></p>
<?php echo form_close() ?>
<br /><br />
<?php echo anchor('login/register','注册')?>
<script src="http://libs.baidu.com/jquery/1.7.2/jquery.min.js"></script>
<SCRIPT LANGUAGE="JavaScript">
$(document).ready(function() {
$('#name').blur(function(){
var username = $("#name").val();
$.ajax({
type:"POST",
url:"<?php echo base_url().'login/recheckme'?>",
data:{name:username},
success:function(data){
//alert(data);
$("#ninput").html(data);
}
})
})
});
$('#submit').click(function(){
return false;
});
</SCRIPT>