Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/37.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 如何使按钮触发图像不透明度更改?_Javascript_Css_Image_Html_Opacity - Fatal编程技术网

Javascript 如何使按钮触发图像不透明度更改?

Javascript 如何使按钮触发图像不透明度更改?,javascript,css,image,html,opacity,Javascript,Css,Image,Html,Opacity,点击按钮会触发图像显示 编辑我实际上让它工作了,但是当改变一些ID链接时它停止工作了,如果我在我的侧菜单上留下这些功能中的任何一个都不会出现 <!DOCTYPE html> <html lang="en" class="no-js"> <head> <meta charset="UTF-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge,c

点击按钮会触发图像显示

编辑我实际上让它工作了,但是当改变一些ID链接时它停止工作了,如果我在我的侧菜单上留下这些功能中的任何一个都不会出现

<!DOCTYPE html>
<html lang="en" class="no-js">
    <head>
        <meta charset="UTF-8" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> 
        <meta name="viewport" content="width=device-width, initial-scale=1.0"> 
        <title>MAKE A CUPCAKE! | YourCupcake.com</title>
        <meta name="description" content="Blueprint: Slide and Push Menus" />
        <meta name="keywords" content="sliding menu, pushing menu, navigation, responsive, menu, css, jquery" />
        <meta name="author" content="Codrops" />
        <link rel="shortcut icon" href="../favicon.ico">
        <link rel="stylesheet" type="text/css" href="css/default.css" />
        <link rel="stylesheet" type="text/css" href="css/component.css" />
        <script src="js/modernizr.custom.js"></script>
    </head>
    <body class="cbp-spmenu-push">
        <nav class="cbp-spmenu cbp-spmenu-vertical cbp-spmenu-right beslagopties" id="beslagopties">
            <h3>Beslag</h3>

            <h2>Kies je beslag smaak:</h2>

            <input type="radio" name="smaakBeslag" value="Vanille" class="smaakBeslag"> Vanille<br>
            <input type="radio" name="smaakBeslag" value="Chocolade" class="smaakBeslag">Chocolade<br>
            <input type="radio" name="smaakBeslag" value="Aardbei" class="smaakBeslag"> Aardbei<br>
            <input type="radio" name="smaakBeslag" value="RedVelvet" class="smaakBeslag"> Red Velvet<br>
            <input type="radio" name="smaakBeslag" value="Banaan" class="smaakBeslag"> Banaan<br>
            <input type="radio" name="smaakBeslag" value="Kokos" class="smaakBeslag"> Kokos<br>

            <h2>Kies je beslagkleur:</h2>

            <button type="button" onclick="Function1()" >Blauw</button><br/>
            <button type="button" onclick="Function2()" >Paars</button><br/>
            <button type="button" onclick="Function3()" >Rood</button><br/>
            <button type="button" onclick="Function4()" >Roze</button><br/>
            <button type="button" onclick="Function5()" >Bruin</button><br/>

        </nav>

        <nav class="cbp-spmenu cbp-spmenu-vertical cbp-spmenu-right bakingcupopties" id="bakingcupopties">
            <h3>BakingCup</h3>
            <h2>Kies je bakingcup kleur:</h2>
            <button type="button" onclick="Function6()" >Paars</button><br/>
            <button type="button" onclick="Function7()" >Blauw</button><br/>
            <button type="button" onclick="Function8()" >Geel</button><br/>
            <button type="button" onclick="Function9()" >Rood</button><br/>
            <button type="button" onclick="Function10()">Roze</button><br/>
            <button type="button" onclick="Function11()">Wit</button><br/>

            <h2>Kies je bakingcup plaatje:</h2>
            <button type="button" onclick="Function12()" >Skulls</button><br/>
            <button type="button" onclick="Function13()" >Hartjes</button><br/>
            <button type="button" onclick="Function14()" >Bubbles</button><br/>
            <button type="button" onclick="Function15()" >Bloemetjes</button><br/>
            <button type="button" onclick="Function16()" >Niets</button><br/>
        </nav>

        <nav class="cbp-spmenu cbp-spmenu-vertical cbp-spmenu-right plattetoppingding" id="plattetoppingding">
            <h3>Platte topping</h3>
            <h2> Kies je soort:</h2>
            <input type="radio" name="soortFondant" value="fondant" class="soortFondant">Fondant<br/>
            <input type="radio" name="soortFondant" value="marsepijn" class="soortFondant">Marsepijn<br/>
            <input type="radio" name="soortFondant" value="glazuur" class="soortFondant">Glazuur<br/>

            <h2> Kies je fondantkleur:</h2>
            <button type="button" onclick="Function17()" >Blauw</button><br/>
            <button type="button" onclick="Function18()" >Bruin</button><br/>
            <button type="button" onclick="Function19()" >Groen</button><br/>
            <button type="button" onclick="Function20()" >Paars</button><br/>
            <button type="button" onclick="Function21()" >Rood</button><br/>
            <button type="button" onclick="Function22()" >Roze</button><br/>

            <h2> Kies je versiering:</h2>
            <button type="button" onclick="Function23()">Quilten</button><br/>
            <button type="button" onclick="Function24()" >Lijnen</button><br/>
            <button type="button" onclick="Function25()" >Rondjes</button><br/>
            <button type="button" onclick="Function26()" >Geen</button>
        </nav>

        <nav class="cbp-spmenu cbp-spmenu-vertical cbp-spmenu-right toeftopperding" id="toeftopperding">
            <h3>Toeftopping</h3>
            <h2>Kies je soort:</h2>
            <input type="radio" name="soortTopping" value="slagroom" class="soortTopping">Slagroom<br/>
            <input type="radio" name="soortTopping" value="botercreme" class="soortTopping">Botercreme<br/>
            <input type="radio" name="soortTopping" value="royal-icing" class="soortTopping">Royal Icing<br/>
            <input type="radio" name="soortTopping" value="creamcheese" class="soortTopping">Cream cheese<br/>

            <h2> Kies je toppingkleur:</h2>
            <button type="button" onclick="Function27()" >Paars</button><br/>
            <button type="button" onclick="Function28()" >Blauw</button><br/>
            <button type="button" onclick="Function29()" >Bruin</button><br/>
            <button type="button" onclick="Function30()" >Geel</button><br/>
            <button type="button" onclick="Function31()" >Oranje</button><br/>
            <button type="button" onclick="Function32()" >Wit</button><br/>

            <h2>Kies je toppingversiering:</h2>
            <button type="button" onclick="Function33()" >Balletjes</button><br/>
            <button type="button" onclick="Function34()" >Hagelslag</button><br/>
            <button type="button" onclick="Function35()" >Discohagel</button><br/>
            <button type="button" onclick="Function36()" >Geen</button><br/>
        </nav>

        <nav class="cbp-spmenu cbp-spmenu-vertical cbp-spmenu-right topperding" id="topperding">
            <h3>Topper</h3>
            <h2> Kies je topper:</h2>
            <button type="button" onclick="Function37()" >Aardbei</button><br/>
            <button type="button" onclick="Function38()" >Kers</button><br/>
            <button type="button" onclick="Function39()" >Kaars</button><br/>
            <button type="button" onclick="Function40()" >Hartje<</button>
            <button type="button" onclick="Function41()" >Bloemetje</button><br/>
            <button type="button" onclick="Function42()" >Geen<br/></button>
        </nav>

        <nav class="cbp-spmenu cbp-spmenu-vertical cbp-spmenu-right kaartjeding" id="kaartjeding">
            <h3>Kaartje</h3>
            <h2> Kies je kaartje:</h2>
            <button type="button" onclick="Function43()" >Rood</button><br/>
            <button type="button" onclick="Function44()" >Roze</button><br/>
            <button type="button" onclick="Function45()" >Blauw</button><br/>
            <button type="button" onclick="Function46()" >Geel</button><br/>
            <button type="button" onclick="Function47()" >Groen</button><br/>
            <button type="button" onclick="Function48()" >Wit</button><br/>
            <button type="button" onclick="Function49()" >Geen</button><br/>
        </nav>

        <div class="container">
            <header class="clearfix">
                <span>Cupcakes...</span>
                <h1>Make your own!</h1>
            </header>
            <div class="main">
                <section>
                    <h2>Change it!</h2>
                    <!-- Class "cbp-spmenu-open" gets applied to menu -->

                    <button id="beslag1">Beslag</button>
                    <button id="bakingcup1">Baking cup</button>
                    <button id="plattetoppingding1">plat</button>
                    <button id="toeftopperding1">toef</button>
                    <button id="topperding1">topperding</button>
                    <button id="kaartjeding1">kaartjeding</button>
                    <!--<button id="plat1">Platte topping</button>
                    <button id="toef1">Toef topping</button>
                    <button id="topper1">Topper</button>
                    <button id="kaartje1">Kaartje</button>-->
                </section>
            </div>
            <div class="images">
                <img src="../../Pictures/Cupcakeparts/Bakje-Kleur/Schaduw-01.png"/>
                <img src="../../Pictures/Cupcakeparts/Beslag/Rood-01.png" id="RoodBeslag"/>
                <img src="../../Pictures/Cupcakeparts/Beslag/Blauw-01.png" id="BeslagBlauw"/>
                <img src="../../Pictures/Cupcakeparts/Beslag/Paars-01.png" id="BeslagPaars"/>
                <img src="../../Pictures/Cupcakeparts/Beslag/Roze-01.png" id="BeslagRoze"/>
                <img src="../../Pictures/Cupcakeparts/Beslag/Bruin-01.png" id="BeslagBruin"/>
                <img src="../../Pictures/Cupcakeparts/Bakje-Kleur/Wit-01.png" id="BakjeWit"/>
                <img src="../../Pictures/Cupcakeparts/Bakje-Kleur/Roze-01.png" id="BakjeRoze"/>
                <img src="../../Pictures/Cupcakeparts/Bakje-Kleur/Rood-01.png" id="BakjeRood"/>
                <img src="../../Pictures/Cupcakeparts/Bakje-Kleur/Paars-01.png" id="BakjePaars"/>
                <img src="../../Pictures/Cupcakeparts/Bakje-Kleur/Geel-01.png" id="BakjeGeel"/>
                <img src="../../Pictures/Cupcakeparts/Bakje-Kleur/Blauw-01.png" id="BakjeBlauw"/>
                <img src="../../Pictures/Cupcakeparts/Bakje-Tekening/Hartjes-01.png" id="BakjeHartjes"/>
                <img src="../../Pictures/Cupcakeparts/Bakje-Tekening/skulls-01.png" id="BakjeSkulls"/>
                <img src="../../Pictures/Cupcakeparts/Bakje-Tekening/Bloemetjes-01.png" id="BakjeBloemetjes"/>
                <img src="../../Pictures/Cupcakeparts/Bakje-Tekening/Bubbles-01.png" id="BakjeBubbles"/>
                <img src="../../Pictures/Cupcakeparts/Plat-Kleur/Blauw-01.png" id="PlatBlauw"/>
                <img src="../../Pictures/Cupcakeparts/Plat-Kleur/Bruin-01.png" id="PlatBruin"/>
                <img src="../../Pictures/Cupcakeparts/Plat-Kleur/Groen-01.png" id="PlatGroen"/>
                <img src="../../Pictures/Cupcakeparts/Plat-Kleur/Paars-01.png" id="PlatPaars"/>
                <img src="../../Pictures/Cupcakeparts/Plat-Kleur/Rood-01.png" id="PlatRood"/>
                <img src="../../Pictures/Cupcakeparts/Plat-Kleur/Roze-01.png" id="PlatRoze"/>
                <img src="../../Pictures/Cupcakeparts/Plat-Versiering/Lijnen-01.png" id="PlatLijnen"/>
                <img src="../../Pictures/Cupcakeparts/Plat-Versiering/Quilten-01.png" id="PlatQuilten"/>
                <img src="../../Pictures/Cupcakeparts/Plat-Versiering/Rond-01.png" id="PlatRondjes"/>
                <img src="../../Pictures/Cupcakeparts/Toef-Kleur/Blauw-01.png" id="ToefBlauw"/>
                <img src="../../Pictures/Cupcakeparts/Toef-Kleur/Bruin-01.png" id="ToefBruin"/>
                <img src="../../Pictures/Cupcakeparts/Toef-Kleur/Geel-01.png" id="ToefGeel"/>
                <img src="../../Pictures/Cupcakeparts/Toef-Kleur/Oranje-01.png" id="ToefOranje"/>
                <img src="../../Pictures/Cupcakeparts/Toef-Kleur/Paars-01.png" id="ToefPaars"/>
                <img src="../../Pictures/Cupcakeparts/Toef-Kleur/Wit-01.png" id="ToefWit"/>
                <img src="../../Pictures/Cupcakeparts/Toef-Versiering/Balletjes-01.png" id="ToefBalletjes"/>
                <img src="../../Pictures/Cupcakeparts/Toef-Versiering/Discohagel-01.png" id="ToefDiscohagel"/>
                <img src="../../Pictures/Cupcakeparts/Toef-Versiering/Hagelslag-01.png" id="ToefHagelslag"/>
                <img src="../../Pictures/Cupcakeparts/Toppers/hartje-01.png" id="TopperHartje"/>
                <img src="../../Pictures/Cupcakeparts/Toppers/bloemetje-01.png" id="TopperBloemetje"/>
                <img src="../../Pictures/Cupcakeparts/Toppers/kers-01.png" id="TopperKers"/>
                <img src="../../Pictures/Cupcakeparts/Toppers/aardbei-01.png" id="TopperAardbei"/>
                <img src="../../Pictures/Cupcakeparts/Toppers/kaars-01.png" id="TopperKaars"/>
                <img src="../../Pictures/Cupcakeparts/Kaartje/blauw-01.png" id="KaartjeBlauw"/>
                <img src="../../Pictures/Cupcakeparts/Kaartje/geel-01.png" id="KaartjeGeel"/>
                <img src="../../Pictures/Cupcakeparts/Kaartje/groen-01.png" id="KaartjeGroen"/>
                <img src="../../Pictures/Cupcakeparts/Kaartje/rood-01.png" id="KaartjeRood"/>
                <img src="../../Pictures/Cupcakeparts/Kaartje/roze-01.png" id="KaartjeRoze"/>
                <img src="../../Pictures/Cupcakeparts/Kaartje/wit-01.png" id="KaartjeWit"/>
                <img src="../../Pictures/Cupcakeparts/transparant-01.png" id="Geen"/>
            </div>  
    </div>
        <!-- Classie - class helper functions by @desandro https://github.com/desandro/classie -->
        <script src="js/classie.js"></script>
        <script>
            var 
                menuBeslag = document.getElementById( 'beslagopties' ),
                showBeslag = document.getElementById( 'beslag1' ),
                menuBakingcup = document.getElementById( 'bakingcupopties' ),
                showBakingcup = document.getElementById( 'bakingcup1' ),
                menuPlattetoppingding = document.getElementById( 'plattetoppingding' ),
                showPlattetoppingding = document.getElementById( 'plattetoppingding1' ),
                menuToeftopperding = document.getElementById( 'toeftopperding' ),
                showToeftopperding = document.getElementById( 'toeftopperding1' ),
                menuTopperding = document.getElementById( 'topperding' ),
                showTopperding = document.getElementById( 'topperding1' ),
                menuKaartjeding = document.getElementById( 'kaartjeding' ),
                showKaartjeding = document.getElementById( 'kaartjeding1' ),

                body = document.body;


            showBeslag.onclick = function() {
                classie.toggle( this, 'active' );
                classie.toggle( menuBeslag, 'cbp-spmenu-open' );
                disableOther( 'showBeslag' );
            };

            showBakingcup.onclick = function() {
                classie.toggle( this, 'active' );
                classie.toggle( menuBakingcup, 'cbp-spmenu-open' );
                disableOther( 'showBakingcup' ); 
            };

            showPlattetoppingding.onclick = function() {
                classie.toggle( this, 'active' );
                classie.toggle( menuPlattetoppingding, 'cbp-spmenu-open' );
                disableOther( 'showPlattetoppingding' ); 
            };

            showToeftopperding.onclick = function() {
                classie.toggle( this, 'active' );
                classie.toggle( menuToeftopperding, 'cbp-spmenu-open' );
                disableOther( 'showToeftopperding' ); 
            };

            showTopperding.onclick = function() {
                classie.toggle( this, 'active' );
                classie.toggle( menuTopperding, 'cbp-spmenu-open' );
                disableOther( 'showTopperding' ); 
            };

            showKaartjeding.onclick = function() {
                classie.toggle( this, 'active' );
                classie.toggle( menuKaartjeding, 'cbp-spmenu-open' );
                disableOther( 'showKaartjeding' ); 
            };



        function Function1() {
            x = document.getElementById('BeslagBlauw');
            x.style.width=100%;
            /*y = document.getElementById('Beslagpaars', 'RoodBeslag', 'BeslagRoze', 'BeslagBruin');
            y.style. opacity = 0;*/
        }

        function Function2() {
            x = document.getElementById('BeslagPaars');
            x.style.width=100%;
            /*y = document.getElementById('BeslagBlauw', 'RoodBeslag', 'BeslagRoze', 'BeslagBruin');
            y.style. opacity = 0;*/
        }

        function Function3() {
            x = document.getElementById('RoodBeslag');
            x.style.width=100%;
            /*y = document.getElementById('BeslagPaars', 'BeslagBlauw', 'BeslagRoze', 'BeslagBruin');
            y.style. opacity = 0;*/
        }

        function Function4() {
            x = document.getElementById('BeslagRoze');
            x.style.width=100%;
            /*y = document.getElementById('BeslagPaars', 'RoodBeslag', 'BeslagBlauw', 'BeslagBruin');
            y.style. opacity = 0;*/
        }

        function Function5() {
            x = document.getElementById('BeslagBruin');
            x.style.width=100%;
            /*y = document.getElementById('Beslagpaars', 'RoodBeslag', 'BeslagRoze', 'BeslagBlauw');
            y.style. opacity = 0;*/
        }

        function Function6() {
            x = document.getElementById('BakjePaars');
            x.style.width=100%;
            /*y = document.getElementById('BakjeBlauw', 'BakjeGeel', 'BakjeRood', 'BakjeRoze', 'BakjeWit');
            y.style. opacity = 0;*/
        }


        function Function7() {
            x = document.getElementById('BakjeBlauw');
            x.style.width=100%;
            /*y = document.getElementById('BakjePaars', 'BakjeGeel', 'BakjeRood', 'BakjeRoze', 'BakjeWit');
            y.style. opacity = 0;*/
        }


        function Function8() {
            x = document.getElementById('BakjeGeel');
            x.style.width=100%;
            /*y = document.getElementById('BakjeBlauw', 'BakjePaars', 'BakjeRood', 'BakjeRoze', 'BakjeWit');
            y.style. opacity = 0;*/
        }

        function Function9() {
            x = document.getElementById('BakjeRood');
            x.style.width=100%;
            /*y = document.getElementById('BakjeBlauw', 'BakjeGeel', 'BakjePaars', 'BakjeRoze', 'BakjeWit');
            y.style. opacity = 0;*/
        }



function Function10() {
            x = document.getElementById('BakjeRoze');
            x.style.width=100%;
            /*y = document.getElementById('BakjeBlauw', 'BakjeGeel', 'BakjeRood', 'BakjePaars', 'BakjeWit');
            y.style. opacity = 0;*/
        }

        function Function11() {
            x = document.getElementById('BakjeWit');
            x.style.width=100%;
            /*y = document.getElementById('BakjeBlauw', 'BakjeGeel', 'BakjeRood', 'BakjeRoze', 'BakjePaars');
            y.style. opacity = 0;*/
        }

        function Function12() {
            x = document.getElementById('BakjeSkulls');
            x.style.width=100%;
            /*y = document.getElementById('BakjeHartjes', 'BakjeBloemetjes', 'BakjeBubbles');
            y.style. opacity = 0;*/
        }

        function Function13() {
            x = document.getElementById('BakjeHartjes');
            x.style.width=100%;
            /*y = document.getElementById('BakjeSkulls', 'BakjeBloemetjes', 'BakjeBubbles');
            y.style. opacity = 0;*/
        }

        function Function14() {
            x = document.getElementById('BakjeBubbles');
            x.style.width=100%;
            /*y = document.getElementById('BakjeHartjes', 'BakjeSkulls', 'BakjeBloemetjes');
            y.style. opacity = 0;*/
        }

        function Function15() {
            x = document.getElementById('BakjeBloemetjes');
            x.style.width=100%;
            /*y = document.getElementById('BakjeHartjes', 'BakjeBubbles', 'BakjeSkulls');
            y.style. opacity = 0;*/
        }

        function Function16() {
            x = document.getElementById('Geen');
            x.style.width=100%;
            /*y = document.getElementById('Beslagpaars', 'RoodBeslag', 'BeslagRoze', 'BeslagBlauw');
            y.style. opacity = 0;*/
        }
        /*

        function Function17() {
            x = document.getElementById('PlatBlauw');
            x.style.width=100%;
            /*y = document.getElementById'PlatRood', 'PlatPaars', 'PlatGroen', 'PlatBruin', 'PlatRoze');
            y.style. opacity = 0;*/

        }


function Function18() {
            x = document.getElementById('PlatBruin');
            x.style.width=100%;
            /*y = document.getElementById('PlatRood', 'PlatPaars', 'PlatGroen', 'PlatBruin', 'PlatBlauw');
            y.style. opacity = 0;*/
        }

        function Function19() {
            x = document.getElementById('PlatGroen');
            x.style.width=100%;
            /*y = document.getElementById('PlatRood', 'PlatPaars', 'PlatRoze', 'PlatBruin', 'PlatBlauw');
            y.style. opacity = 0;*/
        }

        function Function20() {
            x = document.getElementById('PlatPaars');
            x.style.width=100%;
            /*y = document.getElementById('PlatRood', 'PlatRoze', 'PlatGroen', 'PlatBruin', 'PlatBlauw');
            y.style. opacity = 0;*/
        }

        function Function21() {
            x = document.getElementById('PlatRood');
            x.style.width=100%;
            /*y = document.getElementById('PlatRoze', 'PlatPaars', 'PlatGroen', 'PlatBruin', 'PlatBlauw');
            y.style. opacity = 0;*/
        }

        function Function22() {
            x = document.getElementById('PlatRoze');
            x.style.width=100%;
            /*y = document.getElementById('PlatRood', 'PlatPaars', 'PlatGroen', 'PlatBruin', 'PlatBlauw');
            y.style. opacity = 0;*/
        }

        function Function23() {
            x = document.getElementById('PlatQuilten');
            x.style.width=100%;
            /*y = document.getElementById('PlatLijnen','PlatRondjes');
            y.style. opacity = 0;*/

        }

        function Function24() {
            x = document.getElementById('PlatLijnen');
            x.style.width=100%;
            /*y = document.getElementById('PlatQuilten', 'PlatRondjes');
            y.style. opacity = 0;*/

        }

        function Function25() {
            x = document.getElementById('PlatRondjes');
            x.style.width=100%;
            /*y = document.getElementById('PlatLijnen', 'PlatQuilten');
            y.style. opacity = 0;*/

        }

        function Function26() {
            x = document.getElementById('Geen');
            x.style.width=100%;
            /*y = document.getElementById('PlatLijnen', 'PlatQuilten', 'PlatRondjes');
            y.style. opacity = 0;*/

        }

        function Function27() {
            x = document.getElementById('ToefPaars');
            x.style.width=100%;
            /*y = document.getElementById('ToefOranje','ToefGeel','ToefBruin','ToefBlauw','ToefWit');
            y.style. opacity = 0;*/

        }

        function Function28() {
            x = document.getElementById('ToefBlauw');
            x.style.width=100%;
            /*y = document.getElementById('ToefOranje','ToefGeel','ToefBruin','ToefWit','ToefPaars');
            y.style. opacity = 0;*/

        }

        function Function29() {
            x = document.getElementById('ToefBruin');
            x.style.width=100%;
            /*y = document.getElementById('ToefOranje','ToefGeel','ToefWit','ToefBlauw','ToefPaars');
            y.style. opacity = 0;*/

        }

        function Function30() {
            x = document.getElementById('ToefGeel');
            x.style.width=100%;
            /*y = document.getElementById('ToefOranje','ToefWit','ToefBruin','ToefBlauw','ToefPaars');
            y.style. opacity = 0;*/

        }

        function Function31() {
            x = document.getElementById('ToefOranje');
            x.style.width=100%;
            /*y = document.getElementById('ToefWit','ToefGeel','ToefBruin','ToefBlauw','ToefPaars');
            y.style. opacity = 0;*/

        }

        function Function32() {
            x = document.getElementById('ToefWit');
            x.style.width=100%;
            /*y = document.getElementById('ToefOranje','ToefGeel','ToefBruin','ToefBlauw','ToefPaars');
            y.style. opacity = 0;*/

        }

        function Function33() {
            x = document.getElementById('ToefBalletjes');
            x.style.width=100%;
            /*y = document.getElementById('ToefDiscohagel','ToefHagelslag');
            y.style. opacity = 0;*/

        }

        function Function34() {
            x = document.getElementById('ToefHagelslag');
            x.style.width=100%;
            /*y = document.getElementById('ToefDiscohagel', 'ToefBalletjes');
            y.style. opacity = 0;*/

        }

        function Function35() {
            x = document.getElementById('ToefDiscohagel');
            x.style.width=100%;
            /*y = document.getElementById('ToefHagelslag', 'ToefBalletjes');
            y.style. opacity = 0;*/

        }

        function Function36() {
            x = document.getElementById('Geen');
            x.style.width=100%;
            /*y = document.getElementById('ToefDiscohagel','ToefHagelslag', 'ToefBalletjes');
            y.style. opacity = 0;*/

        }


        function Function37() {
            x = document.getElementById('TopperAardbei');
            x.style.width=100%;
            /*y = document.getElementById('TopperBloemetje', 'TopperHartje', 'TopperKaars', 'TopperKers' );
            y.style. opacity = 0;*/

        }

        function Function38() {
            x = document.getElementById('TopperKers');
            x.style.width=100%;
            /*y = document.getElementById('TopperBloemetje', 'TopperHartje', 'TopperKaars', 'TopperAardbei' );
            y.style. opacity = 0;*/
        }

        function Function39() {
            x = document.getElementById('TopperKaars');
            x.style.width=100%;
            /*y = document.getElementById('TopperBloemetje', 'TopperHartje', 'TopperKers', 'TopperAardbei' );
            y.style. opacity = 0;*/  
        }

        function Function40() {
            x = document.getElementById('TopperHartje');
            x.style.width=100%;
            /*y = document.getElementById('TopperBloemetje', 'TopperKaars', 'TopperKers', 'TopperAardbei' );
            y.style. opacity = 0;*/
        }

        function Function41() {
            x = document.getElementById('TopperBloemetje');
            x.style.width=100%;
            /*y = document.getElementById('TopperHartje', 'TopperKaars', 'TopperKers', 'TopperAardbei' );
            y.style. opacity = 0;*/
        }

        function Function42() {
            x = document.getElementById('Geen');
            x.style.width=100%;
            /*y = document.getElementById('TopperBloemetje', 'TopperHartje', 'TopperKaars', 'TopperKers', 'TopperAardbei' );
            y.style. opacity = 0;*/

        }

        function Function43() {
            x = document.getElementById('KaartjeRood');
            x.style.width=100%;
            /* = document.getElementById('KaartjeGroen', 'KaartjeGeel', 'KaartjeBlauw', 'KaartjeWit', 'KaartjeRoze');
            y.style. opacity = 0;*/

        }

        function Function44() {
            x = document.getElementById('KaartjeRoze');
            x.style.width=100%;
            /*y = document.getElementById('KaartjeGroen', 'KaartjeGeel', 'KaartjeBlauw', 'KaartjeRood', 'KaartjeWit');
            y.style. opacity = 0;*/

        }

        function Function45() {
            x = document.getElementById('KaartjeBlauw');
            x.style.width=100%;
            /*y = document.getElementById('KaartjeGroen', 'KaartjeGeel', 'KaartjeWit', 'KaartjeRood', 'KaartjeRoze');
            y.style. opacity = 0;*/

        }

        function Function46() {
            x = document.getElementById('KaartjeGeel');
            x.style.width=100%;
            /*y = document.getElementById('KaartjeGroen', 'KaartjeWit', 'KaartjeBlauw', 'KaartjeRood', 'KaartjeRoze');
            y.style. opacity = 0;*/

        }
        function Function47() {
            x = document.getElementById('KaartjeGroen');
            x.style.width=100%;
            /*y = document.getElementById('KaartjeWit', 'KaartjeGeel', 'KaartjeBlauw', 'KaartjeRood', 'KaartjeRoze');
            y.style. opacity = 0;*/

        }


        function Function48() {
            x = document.getElementById('KaartjeWit');
            x.style.width=100%;
            /*y = document.getElementById('KaartjeGroen', 'KaartjeGeel', 'KaartjeBlauw', 'KaartjeRood', 'KaartjeRoze');
            y.style. opacity = 0;*/

        }

        function Function49() {
            x = document.getElementById('Geen');
            x.style.width=100%;
            /*y = document.getElementById('KaartjeGroen', 'KaartjeGeel', 'KaartjeBlauw', 'KaartjeRood', 'KaartjeRoze', 'KaartjeWit');
            y.style. opacity = 0;*/


        }

            /*function disableOther( button ) {

                if( button !== 'beslag1' ) {
                    classie.toggle( showBeslag, 'disabled' );
                }

                if( button !== 'bakingcup1' ) {
                    classie.toggle( showBakingcup, 'disabled' );
                }

                if( button !== 'plattetoppingding1' ) {
                    classie.toggle( showPlattetoppingding, 'disabled' );
                }

                if( button !== 'toeftopperding1' ) {
                    classie.toggle( showToeftopperding, 'disabled' );
                }


                if( button !== 'topperding1' ) {
                    classie.toggle( showTopperding, 'disabled' );
                }


                if( button !== 'kaartjeding1' ) {
                    classie.toggle( showKaartjeding, 'disabled' );
                }


            }*/
        </script>
    </body>
</html>

做一个纸杯蛋糕YourCupcake.com
贝斯格
我的朋友们:
瓦尼尔
巧克力
阿德贝
红丝绒
巴南
科科斯
我是贝斯拉克勒: Blauw
Paars
Rood
罗兹
布鲁因
烤杯 Kies je bakingcup kleur: Paars
Blauw
吉尔
Rood
罗兹
智慧
Kies je bakingcup plaatje: 头骨
哈特杰斯
气泡
Bloemetjes
侄女们
普拉特浇头 Kies je soort: 方丹 Marsepijn
格拉祖尔
Kies je fondantkleur: Blauw
布鲁因
呻吟
Paars
Rood
罗兹
Kies je Versioning: 绗缝布
李宁
朗杰斯
吉恩 趾顶 Kies je soort: slagromon
双螺旋体
皇家糖衣
奶油奶酪
Kies je toppingkleur: Paars
Blauw
布鲁因
吉尔
奥兰杰
智慧
Kies je ToppingVersioning: Balletjes
哈格斯拉格
迪斯科黑格尔
吉恩
托普 Kies je topper: 阿德贝
Kers
Kaars
哈杰
粗略地说,您需要单击来触发一些javascript代码,以更改相关目标的不透明度。一个简单的例子如下:

<style>
.topping {
    opacity: 0;
}
</style>
<div onclick='changeOpacity()'>Click me</div>
<div id=changeme class=topping>Hello</div>
<script>

function changeOpacity() {
    x = document.getElementById('changeme');
    x.style.opacity = 1;
}
</script>

.浇头{
不透明度:0;
}
点击我
你好
函数changeOpacity(){
x=document.getElementById('changeme');
x、 style.opacity=1;
}
我认为您要寻找的相关信息是如何更改不透明度(
x.style.opacity
,或者您可以使用jQuery),但是您还需要整理如何将按钮与适当的图像链接起来


单选按钮可能有点不同,但本质上是相同的想法。

代码?没有它,我们做不了多少。。我怎么能给你们看?我有很多图片链接在里面?只要把HTML粘贴到你原来的帖子里就行了。我们所需要的只是代码,不需要看到图像的样子:)我假设其中涉及到一些JavaScript。我注意到这不是你的标签之一..我喜欢在我想向一些HTML添加图像时使用,只是让互联网更快乐:)谢谢!这实际上起了一些作用。。。在我的html中更改了一些内容,现在它不再工作了-,-在我的问题中添加了一个新的html文件。。你能看看它吗?试着找出为什么iit不再起作用了?如果我添加函数,我的侧边栏将不再工作。。。函数和侧边栏实际上在今晚工作了一段时间。。。现在它不是:x