کد ایجاد گالری عکس ساده در سایت

کد گالری عکس درسایت شما میتوانید بااین کدیک گالری عکس ساده در سایت و یا وبلاگ خود ایجاد کنید. شما میتوانیددر کدبا جایگزینی ادرس عکسها و شخصی سازی کامل ازاین کد درمطالب و یا قالب سایت خود استفاده کنید.

نحوه استفاده از کد بستگی به ذهن خلاق شما داره.

 

کد ایجاد گالری عکس ساده در سایت

پیشنمایش کد

 <style>
table{
    background: url(https://codebazan.ir/all/img/bg.jpg) no-repeat center top fixed;
    background-size: cover;
    font-family: Tahoma, Helvetica, sans-serif;
    font-weight: 400;
    direction: rtl;
    -webkit-font-smoothing: antialiased;
margin:16px
auto;padding:10px
۰;text-align:center;width:0%;border:px
solid  #B99679;border-radius:5px;-moz-border-radius:5px}input {border:10px;border-radius:5px;padding:5;width:100;margin-top:10;float:center}td{margin:16px
auto;padding:1px
۰;text-align:center;border:0px
solid  #B99679;}
</style><h2><a style="display:none;" href="https://www.codebazan.ir/">&#1705;&#1583;&#1576;&#1575;&#1586;&#1575;&#1606;</a></h2>

<body>
<script language="JavaScript"> 
  
//defining images
 
picture1 = new Image()
picture1.src = "https://codebazan.ir/test.png"
  
picture11 = new Image() 
picture11.src = "https://codebazan.ir/test1.jpg"
 
picture111 = new Image()
picture111.src = "https://codebazan.ir/logo.png"
 
picture1111 = new Image()
picture1111.src = "https://codebazan.ir/wp-content/uploads/2016/01/scrolbar.png"

picture11111 = new Image()
picture11111.src = "https://codebazan.ir/test.png"
  
function switchImage(imageName) {
  mousePosition = document.Iform.Ihide.value
  if (mousePosition == "11111") {
    var mousePosition = 0
  }
  mousePosition = mousePosition + 1
  imgToAlter = eval(imageName + mousePosition + ".src"); 
  document.images[imageName].src = imgToAlter;
  document.Iform.Ihide.value = mousePosition  
}
</script>
 <center>
<table border="1">
    <tr>
        <td><form name="Iform">
            <input type="hidden" name="Ihide" value><p
            align="center"><img src="https://codebazan.ir/test1.jpg" width="440"
            height="280" name="picture"><br><input type="button"
            value="عکس بعدی" onclick="switchImage('picture')">
            </p>
        </form>
        </td>
    </tr>
</table>
</body>
</html>

 

دیدگاهتان را بنویسید

نشانی ایمیل شما منتشر نخواهد شد. بخش‌های موردنیاز علامت‌گذاری شده‌اند *