如何隐藏cc,bcc最初的邮箱形式

时间:2017-03-30 05:47:27

标签: javascript jquery html email

我开发了一个邮箱格式,我想先隐藏cc,bcc选项。 cc,bcc将在我点击他们的选项时。 我无法做到这一点。

<form class="inbox-compose form-horizontal" id="fileupload" action="#" method="POST" enctype="multipart/form-data">
    <div class="inbox-compose-btn">
        <button class="btn green">
            <i class="fa fa-check"></i>Send</button>
        <button class="btn default inbox-discard-btn">Discard</button>
        <button class="btn default">Draft</button>
    </div>
    <div class="inbox-form-group mail-to">
        <label class="control-label">To:</label>
        <div class="controls controls-to">
            <input type="text" class="form-control" name="to">
            <span class="inbox-cc-bcc">
                <span class="inbox-cc"> Cc </span>
                <span class="inbox-bcc"> Bcc </span>
            </span>
        </div>
    </div>
    <div class="inbox-form-group input-cc display-hide">
        
        <label class="control-label">Cc:</label>
        <div class="controls controls-cc">
            <input type="text" name="cc" class="form-control"> </div>
    </div>
    <div class="inbox-form-group input-bcc display-hide">
        
        <label class="control-label">Bcc:</label>
        <div class="controls controls-bcc">
            <input type="text" name="bcc" class="form-control"> </div>
    </div>
    <div class="inbox-form-group">
        <label class="control-label">Subject:</label>
        <div class="controls">
            <input type="text" class="form-control" name="subject"> </div>
    </div>
    <div class="inbox-form-group">
        <textarea class="inbox-editor inbox-wysihtml5 form-control" name="message" rows="12"></textarea>

请帮助我改善表格

2 个答案:

答案 0 :(得分:0)

最初将div隐藏起来:

<span class="inbox-cc-bcc" style="display:none;">
    <span class="inbox-cc"> Cc </span>
    <span class="inbox-bcc"> Bcc </span>
</span>

并使用jquery cc, bcc button方法在show()上添加事件侦听器来显示它

答案 1 :(得分:0)

您可以使用<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.praveent.googlebooksapi"> <uses-permission android:name="android.permission.INTERNET"></uses-permission> <application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_round" android:supportsRtl="true" android:theme="@style/AppTheme"> <activity android:name=".MainActivity"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application> </manifest>类隐藏最初要隐藏的部分。

<强> HTML

hide

<强>的jQuery

<form class="inbox-compose form-horizontal" id="fileupload" action="#" method="POST" enctype="multipart/form-data">
    <div class="inbox-compose-btn">
        <button class="btn green">
            <i class="fa fa-check"></i>Send</button>
        <button class="btn default inbox-discard-btn">Discard</button>
        <button class="btn default">Draft</button>
    </div>
    <div class="inbox-form-group mail-to">
        <label class="control-label">To:</label>
        <div class="controls controls-to">
            <input type="text" class="form-control" name="to">
            <span class="inbox-cc-bcc">
              <span class="inbox-cc" style="cursor: pointer;cursor: hand;"> Cc </span>
                <span class="inbox-bcc" style="cursor: pointer;cursor: hand;"> Bcc </span>
            </span>
        </div>
    </div>
    <div id="divCC" class="inbox-form-group input-cc display-hide hide">

        <label class="control-label">Cc:</label>
        <div class="controls controls-cc">
            <input type="text" name="cc" class="form-control"> </div>
    </div>
    <div id="divBCC" class="inbox-form-group input-bcc display-hide hide">

        <label class="control-label">Bcc:</label>
        <div class="controls controls-bcc">
            <input type="text" name="bcc" class="form-control"> </div>
    </div>
    <div class="inbox-form-group">
        <label class="control-label">Subject:</label>
        <div class="controls">
            <input type="text" class="form-control" name="subject"> </div>
    </div>
    <div class="inbox-form-group">
    <textarea class="inbox-editor inbox-wysihtml5 form-control" name="message" rows="12"></textarea></div>


    <div id="push"></div>
</form>

这是一个工作小提琴: http://www.codeply.com/go/iPH6UVoHkc

希望这有帮助!