在javascript窗口中删除边框和填充 [英] Erasing border and padding in javascript window

查看:74
本文介绍了在javascript窗口中删除边框和填充的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我真的真的很喜欢javascripts,所以我不能真的完全理解以前的帖子关于这个问题。


无论如何,我正在建立一个画册网站。当我点击

缩略图或图片时,会在javascript

窗口中弹出更大的图片。但是在弹出窗口中我的较大图片的顶部和左侧有一个空格

。我怎么摆脱它?另外,我希望

窗口适合我的照片,所以周围没有任何空间。


这就是我所拥有的:


< table height =" 333"边界=" 0"对齐= QUOT;中心" cellspacing =" 0">

< tr valign =" bottom">

< td align =" center"> < SCRIPT language =" JavaScript">

<! -

function my_win()

{

window.open(''picturealbum / MattMe%20Thumbnails / images / MattMe1_jpg.jpg'',''mywindow'',''width = 306,height = 257,border = 0,padding = 0'');

}

// - >

< / SCRIPT> < A HREF =" javascript :my_win()">< IMG

SRC =" picturealbum / MattMe%20Thumbnails / thumbnails / MattMe1_jpg.jpg"

border =" 0">< / A>< / td>

< td align =" center">< a

href =" picturealbum / MattMe%20Thumbnails / images / MattMe10_jpg.jpg">< img

src =" picturealbum / MattMe%20Thumbnails / thumbnails / MattMe10_jpg.jpg" ;

border =" 0">< / a>

< / td>

Hi,

I''m really really really new to javascripts and so i couldn''t really
comprehend thoroughly on the the previous posts regarding this issue.

Anyways, I''m setting up a picture album site. When i click on a
thumbnail or a picture, a larger picture pops up in a javascript
window. But it has a space on the top and on the left of my larger pic
in the pop-up window. How do i get rid of that? Also, i want the
window to fit my my pic so there''s no space whatsoever around it.

Here is what i have:

<table height="333" border="0" align="center" cellspacing="0">
<tr valign="bottom">
<td align="center"> <SCRIPT language="JavaScript">
<!--
function my_win()
{
window.open(''picturealbum/MattMe%20Thumbnails/images/MattMe1_jpg.jpg'',''mywindow'',''width=306,height=257, border=0,padding=0'');
}
//-->
</SCRIPT> <A HREF="javascript:my_win()"><IMG
SRC="picturealbum/MattMe%20Thumbnails/thumbnails/MattMe1_jpg.jpg"
border="0"></A></td>
<td align="center"><a
href="picturealbum/MattMe%20Thumbnails/images/MattMe10_jpg.jpg"><img
src="picturealbum/MattMe%20Thumbnails/thumbnails/MattMe10_jpg.jpg"
border="0"></a>
</td>

推荐答案

2004年11月17日00:23:38 -0800,Eva写道:
On 17 Nov 2004 00:23:38 -0800, Eva wrote:
当我点击一个
缩略图或图片时,放大图片弹出一个javascript
窗口。但是在弹出窗口的大图片的顶部和左侧有一个空格。我如何摆脱它?
When i click on a
thumbnail or a picture, a larger picture pops up in a javascript
window. But it has a space on the top and on the left of my larger pic
in the pop-up window. How do i get rid of that?




CSS。 (这个不需要JS)


-

Andrew Thompson
http://www.PhySci.org/codes/ Web& IT帮助
http://www.PhySci.org/ 开源软件套件
http://www.1point1C.org/ Science&技术
http://www.LensEscapes.com/ 图像逃脱世俗的



CSS. (JS is not needed for this one)

--
Andrew Thompson
http://www.PhySci.org/codes/ Web & IT Help
http://www.PhySci.org/ Open-source software suite
http://www.1point1C.org/ Science & Technology
http://www.LensEscapes.com/ Images that escape the mundane


谢谢。但插入什么以及我的编码在哪里插入呢?


***通过Developersdex发送 http://www.developersdex.com ***

不要只是参加USENET ......获得奖励!
Thanks. But what do insert and where in my coding do i insert it?

*** Sent via Developersdex http://www.developersdex.com ***
Don''t just participate in USENET...get rewarded for it!


2004年11月17日星期三08:35:53 GMT,Andrew Thompson< Se ******** @ www.invalid>

写道:
On Wed, 17 Nov 2004 08:35:53 GMT, Andrew Thompson <Se********@www.invalid>
wrote:
2004年11月17日00:23:38 -0800,Eva写道:
On 17 Nov 2004 00:23:38 -0800, Eva wrote:
[...]它有
弹出窗口中我的较大图片顶部和左侧的空格。我如何摆脱它?
[...] it has a space on the top and on the left of my larger pic in the
pop-up window. How do i get rid of that?



CSS。 (这个不需要JS)



CSS. (JS is not needed for this one)




我不认为这在这里是可行的。在OP中,新的

窗口的内容本身就是一个图像。 CSS在这里没有申请。


我不确定是否有解决方案。如果浏览器在显示图像时决定填充

视口,我怀疑你是否可以说服它。


Mike


-

Michael Winter

替换.invalid与.uk通过电子邮件回复。



I don''t think that''s feasible here. In the OP, the contents of the new
window is an image by itself. CSS would have no application here.

I''m not sure if there is a solution. If a browser decides to pad the
viewport when displaying an image, I doubt you can persuade it otherwise.

Mike

--
Michael Winter
Replace ".invalid" with ".uk" to reply by e-mail.


这篇关于在javascript窗口中删除边框和填充的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆