• 09-01-2023, 22:37:28
    #1
    Kimlik doğrulama veya yönetimden onay bekliyor.
    Merhaba, Web Sitemde Kullanıcı Web Sitemin Backgroundunu İstedigi Gibi Seçebilsin İstiyorum Örneğin Bir Buton Olucak Temalar Yazıcak kullanıcı o temalardan istediği temayı seçicek siteyi öyle kullanacak
  • 09-01-2023, 22:42:47
    #2
    <html>
    <head>
    <script type="text/javascript" src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
    <!--download jquery.cookie from here http://plugins.jquery.com/cookie -->
    <script type="text/javascript" src="images/jquery.cookie.js"></script>
    <script type="text/javascript">
    $(document).ready(function(){
    var theme = $.cookie("backgroundImage");
    if (theme){document.getElementById("shelf").style.backgroundImage = "url("+theme+")";}
    $("#themes").change(function() {
    theme = $(this).val();
    $.cookie("backgroundImage", theme);
    document.getElementById("shelf").style.backgroundImage = "url("+theme+")";
    });
    });
    </script>
    </head>
    <body id="shelf">
    <!--<select id="themes" onChange="changeTheme()" name="ChangeBG">-->
    <select id="themes" name="ChangeBG">
    <option value="images/background1.jpg" selected="selected">Default</option>
    <option value="images/background2.jpg">Heart</option>
    <option value="images/background3.jpg">Earthly</option>
    <option value="images/background4.jpg">Sunflowers</option>
    <option value="images/background5.jpg">Mountin</option>
    </select>
    </body>
    </html>
    Bu kodu düzenleyebilirsiniz hocam
    kaynak:
  • 09-01-2023, 22:45:32
    #3
    Hocam bu attığınızı mesela anasayfaya ekledim adam temayı seçti diyelim diğer tüm sekmelerdede seçtiği background gelir demi