0
我在「所見即所得的網頁製作器」上工作我的網頁,並在主頁上有內聯框架,當我點擊該內嵌框架時,打開了另一個頁面,誰有在線幻燈片放映在上面。我希望打開該頁面時,會自動觸發在線幻燈片放映。 可能我需要一些JavaScript代碼,但我不熟悉編碼。在頁面加載時激活在線幻燈片放映
測試網頁是curently在克羅地亞的語言,但只需點擊圖片
這是在線幻燈片頁面的HTML代碼
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>exteriors</title>
<style type="text/css">
body
{
font-size: 8px;
line-height: 1.1875;
background-color: #FFFFFF;
background-image: url(images/classy_fabric.png);
color: #000000;
}
</style>
<style type="text/css">
a
{
color: #0000FF;
text-decoration: underline;
}
a:visited
{
color: #800080;
}
a:active
{
color: #FF0000;
}
a:hover
{
color: #0000FF;
text-decoration: underline;
}
</style>
<script type="text/javascript" src="jquery-1.7.2.min.js"></script>
<link rel="stylesheet" href="./prettyPhoto/css/prettyPhoto.css" type="text/css">
<script type="text/javascript" src="./prettyPhoto/js/jquery.prettyPhoto.js"></script>
<script type="text/javascript">
$(document).ready(function()
{
$("a[rel^='prettyPhoto_OnlineSlideShow']").prettyPhoto({theme:'facebook'});
});
</script>
</head>
<body>
<div id="OnlineSlideShow" style="position:absolute;left:352px;top:337px;width:300px;height:200px;z-index:0;">
<?php
$images_folder = "../pictures/exteriors/";
$image_width = 300;
$image_height = 200;
$count = 0;
$dir = opendir($images_folder);
while ($filename = readdir($dir))
{
$ext = pathinfo($filename, PATHINFO_EXTENSION);
if ($ext == 'gif' || $ext == 'jpeg' || $ext == 'jpg' || $ext == 'png')
{
echo "<a href=\"$images_folder$filename\" rel=\"prettyPhoto_OnlineSlideShow[OnlineSlideShow]\">";
echo "<img class=\"image\" alt=\"\" style=\"border-width:0;left:0px;top:0px;width:" .$image_width. "px;height:" .$image_height. "px;";
if ($count != 0)
{
echo "display:none;";
}
echo "\" src=\"$images_folder$filename\">";
echo "</a>";
echo "\r\n";
$count++;
}
}
?>
</div>
</body>
</html>
如果您使用的是WYSIWYG構建器,那麼您應該查看該構建器的文檔,瞭解是否可以完成或者是否允許插入js。 – Kami
我在那個軟件的論壇上問,但他們說這是需要一些編碼。我對軟件很熟悉,但我不知道在哪裏放置代碼(在body,body之後),我不知道我需要什麼代碼來觸發此事件? – user3523394