不能让这个正确和有效,虽然简单! [英] Cannot get this one correct and working, though simple!
问题描述
我有40个或jpeg文件,我希望它们显示在名为
" main"的框架中。在点击leftMenu中的相同图片的缩略图时框架。
缩略图jpeg文件名为thumb1,thumb2,thumb3,thumb4,
....,thumb40。这些文件是较小的版本(50pixelX50pixel)的
较大的jpeg文件,分别叫1,2,3,4,...,40,我希望它们显示为
。
要在leftMenu中显示超链接缩略图。框架我有一个循环中的
。 [请参阅代码片段]
但我的问题是代码的一部分......< img src =''thumb $ i.jpg''> ...
它没有显示预期的缩略图jpeg文件;相反,它会以缩略图的形式显示较大版本的文件,这需要加载
更长的时间。
这里''我的循环:
<?php
for($ i = 1; $ i< 40; $ i ++){
if($ i!= 17){
echo"< a href =''$ i.jpg''target =''main''>< img src =' 'thumb $ i.jpg''>< / a>
}
}
?>
有什么帮助吗?非常感谢提前。
jofio
I have 40 or jpeg files which I want them displayed in a frame called
"main" upon clicking thumbnails of the same pics in a "leftMenu" frame.
The thumbnail jpeg files are called thumb1, thumb2, thumb3, thumb4,
...., thumb40. These files are smaller versions (50pixelX50pixel) of the
larger jpeg files called 1, 2, 3, 4, ..., 40 which I want them
displayed.
To display the hyperlinked thumbnails in the "leftMenu" frame I have it
in a loop. [See the code snippet]
But my problem is that part of the code ...<img src=''thumb$i.jpg''> ...
It doesn''t display the intended thumbnail jpeg files; instead, it
display the larger version of the files as thumbnails which takes
longer to load.
Here''s my loop:
<?php
for ( $i = 1; $i < 40; $i++) {
if ($i!=17) {
echo "<a href=''$i.jpg'' target=''main''><img src=''thumb$i.jpg''></a>
}
}
?>
Any help? Many thanks in advance.
jofio
推荐答案
i.jpg''> ...
它没有显示预期的缩略图jpeg文件;相反,它会以缩略图的形式显示较大版本的文件,这需要加载
更长的时间。
这里''我的循环:
<?php
for(
i.jpg''> ...
It doesn''t display the intended thumbnail jpeg files; instead, it
display the larger version of the files as thumbnails which takes
longer to load.
Here''s my loop:
<?php
for (
i = 1;
i< 40;
i < 40;
这篇关于不能让这个正确和有效,虽然简单!的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!