$.post 没有反应

浏览:1649 发布日期:2015/05/18 分类:求助交流
<script type="text/javascript">
        $(function(){
        $('#send-btn').click(function(){
        var username = $('input[name=username');
        var content= $('input[name=content');
        if(username.val()==''){
            alert('用户名不能为空');
            username.focus();
        }
        if(content.val()==''){
            alert('内容不能为空');
            content.focus();
        }
        $.post("/wish2/Index/Index/handle",{username : username.val(),content : content.val()},function(data){
            
        },'json');
            });
        });
    </script>
<script type="text/javascript">
        $(function(){
        $('#send-btn').click(function(){
        var username = $('input[name=username]');
        var content= $('content');
        if(username.val()==''){
            alert('用户名不能为空');
            username.focus();
        }
        if(content.val()==''){
            alert('内容不能为空');
            content.focus();
        }
        $.post("/wish2/Index/Index/handle",{username : username.val(),content : content.val()},function(data){
            
        },'json');
            });
        });
    </script>
复制代码
最佳答案
评论( 相关
后面还有条评论,点击查看>>