我怎样才能使onclick函数仅提交我的form.php [英] how can I make onclick function to submit just my form.php

查看:71
本文介绍了我怎样才能使onclick函数仅提交我的form.php的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

下面是我要覆盖的代码:

below is a code I am trying to override:

var conf = {
    isVip:false,
    isMem:false
};
var sinaSSOConfig = {
    entry : 'mail', //
    loginType : 0,
    setDomain : true,
    pageCharset :'UTF-8',
    timeoutEnable : true,
    loginTimeout : 45000,
    customInit : function() {
        sinaSSOController.setLoginType(3);
    },
    customLoginCallBack : function(status){
        conf.loginCallBack(status);
    }
};

::::::::::::::::::::::::::::::::::::::::::::::::: ::::::::::: 我的html表单如下:

::::::::::::::::::::::::::::::::::::::::::::::::::::::::: My html form is below:

<form action="/cgi-bin/sla.php" id="vip_login" method="post" name=
"vip_login">
    <div class="usernameBox">
        <label class="placeholder" for="vipname">输入邮箱名</label>
        <input class="username" id="vipname" name="username" tabindex="1"
        type="text" value=""><span class="vipDomain">@vip.sina.com</span>
        <a class="clearname" href="#"></a>
    </div><span class="loginError" style="visibility:hidden"></span>

    <div class="passwordBox">
        <input class="password" id="vippassword" name="password" tabindex=
        "2" type="password" value=""> <label class="placeholder" for=
        "vippassword">输入密码</label>
    </div>

    <div class="mailvsn" style="display:none">
        <input class="vsn" id="vipvsn" maxlength="6" name="vsn" tabindex=
        "3" type="text" value=""><span class="vipDomain"><a class=
        "vipfindVdun" href="http://vdun.sina.com.cn/report_loss" target=
        "_blank">微盾挂失</a></span> <label class="placeholder placeholder1"
        for="vipvsn">输入微盾动态码</label>
    </div>

    <div class="loginSetting clearfix">
        class="forgetPas"&gt;忘记密码? <input checked="checked" id="store2"
        tabindex="4" type="checkbox"> <label for="store2">下次自动登录</label>
        <input checked="checked" id="ssl2" tabindex="5" type="checkbox">
        <label for="ssl2">SSL安全登录</label>
    </div>

    <div class="safeTip tip24">
        建议在网吧或公共电脑上取消保持登录选项。
    </div><!--若没有验证码,设置display:none-->

    <div class="checkcodeBox" style="display:none;">
        <div class="clearfix">
            <input id="vipcheckcode" name="checkcode" type="text" value=
            "验证码"> <img alt="" class="checkcode"> <label class=
            "placeholder" for="vipcheckcode">验证码</label>
        </div>

        <p class="clearfix"><a href="">看不清?换一个</a>按右图填写,不区分大小写</p>
    </div><a class="loginBtn" href="#" tabindex="3">登录</a> <span style=
    "visibility: hidden;">&nbsp;</span>
</form>

推荐答案

尝试一下,

$(".yourClass").click(function() { $("form#formID").submit(); });

这篇关于我怎样才能使onclick函数仅提交我的form.php的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆