老模糊的大脑试图了解 [英] old fuzzy brain trying to understand

查看:108
本文介绍了老模糊的大脑试图了解的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想要的应该是每天都很简单,但我似乎无法抓住它。


我想做什么单击一个链接并让该链接发送一个URL到

函数来打开一个特定大小的新寡妇。我希望能够在几个链接上使用

相同的功能。到目前为止我所拥有的是

头部


< script type =" text / javascript" language =" javascript">

function smallWindow(myPage){

window.open(" myPage",toolbar = 0,status = 0,directorie s = 0,菜单栏= 0,resizabl

e = 0,依赖= 1,宽度= 400,身高= 300);

}


然后在我身体的链接中


< a href =" javascript :smallWindow(''http:// www。 somepage.com'')"> somepage< / a>


它会打开一个新窗口,但找不到指定的页面。它也好像b $ b似乎没有按照我想要的大小来衡量。 (顺便说一句,代码全部在一行

行,它只是包装在我的新闻阅读器中)。


我知道这应该是每天简单的事情,但我似乎无法

得到它。


感谢提前任何帮助,


-

戴夫

=====================
多数人有时只意味着所有的傻瓜都在同一边。

---

外发邮件已经过无病毒认证。

由AVG反病毒系统检查( http://www.grisoft.com)

版本:6.0.588 /病毒数据库:372 - 发布日期:2004年2月13日

What I am trying to should be everyday simple, but I just can''t seem to
grasp it.

What I want to do is click a link and have that link send a URL to a
function to open a new widow of a certain size. I want to be able to use
the same function for several links. What I have so far is this in the
head

<script type="text/javascript" language="javascript">
function smallWindow(myPage) {
window.open("myPage",toolbar=0,status=0,directorie s=0,menubar=0,resizabl
e=0,dependant=1,width=400, height=300);
}

Then in the link I have in the body is

<a href="javascript:smallWindow(''http://www.somepage.com'')">somepage</a>

It will open a new window, but it can''t find the specified page. It also
doesn''t seem to be sizing to what I want. (BTW, the code is all on one
line, it''s just wrapping in my news reader).

I know this should be an everyday simple thing, but I just can''t seem to
get a hold on it.

thanks for any help in advance,

--
Dave
=====================
Majority sometimes only means that all the fools are on the same side.
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.588 / Virus Database: 372 - Release Date: 2/13/2004

推荐答案

Nom DePlume < jd*@ccsispXXX.com>在消息中写道

新闻:Qv ******************** @ prvlb.net ...
"Nom DePlume" <jd*@ccsispXXX.com> wrote in message
news:Qv********************@prvlb.net...
什么我试图应该每天都很简单,但我似乎无法抓住它。

我想要做的是点击一个链接并让该链接发送一个URL到
打开一个特定大小的新寡妇的功能。我希望能够为几个链接使用相同的功能。到目前为止,我在

< script type =" text / javascript" language =" javascript">
function smallWindow(myPage){
window.open(" myPage",toolbar = 0,status = 0,directorie s = 0,menubar = 0,resizabl
e = 0,dependent = 1,width = 400,height = 300);
}


window.open()有三个参数:

1.目的地网址

2.新窗口的名称(如果已经存在,它将被重复使用,如果你不想要
想要的话)这个,每次给一个唯一的名字或只是一个空字符串)

3.功能。

在你的代码中只看到两个参数。 myPage不应该在引号中,因为它是b / b
应该是一个变量,不要与文字文本混淆。

功能参数应该是引号但不是。

< a href =" javascript :smallWindow(''http:/ /www.somepage.com'')"> somepage< / a>
What I am trying to should be everyday simple, but I just can''t seem to
grasp it.

What I want to do is click a link and have that link send a URL to a
function to open a new widow of a certain size. I want to be able to use
the same function for several links. What I have so far is this in the
head

<script type="text/javascript" language="javascript">
function smallWindow(myPage) {
window.open("myPage",toolbar=0,status=0,directorie s=0,menubar=0,resizabl
e=0,dependant=1,width=400, height=300);
}
the window.open() takes three parameters:
1. the destination url
2. name of new window (if it exists already, it will be reused, if you don''t
want this, give a unique name each time or just an empty string)
3. features.
In your code see only two parameters. myPage should not be in quotes as it
is supposed a variable and not to be confused with a literal text. The
features parameter should be in quotes but is not.
<a href="javascript:smallWindow(''http://www.somepage.com'')">somepage</a>




使用< a href =" somepage"的onclick = QUOT; smallWin"等>相反。

这样没有javascript的人也会获得新页面(虽然在

原始窗口中)

另外,有些浏览器不会不理解href =" javascript :"很好。请参阅

新闻组常见问题解答:< URL: http:// jibbering.com/faq/#FAQ4_24 >

HTH

Ivo



Use <a href="somepage" onclick="smallWin" etc.> instead.
so that people without javascript will also get the new page (albeit in the
original window)
Also, some browsers don''t understand href="javascript:" very well. See the
newsgroup FAQ: <URL: http://jibbering.com/faq/#FAQ4_24 >
HTH
Ivo


Nom DePlume写道:
Nom DePlume wrote:
我想要的应该是日常简单,但我似乎无法抓住它。

我想要什么要做的是单击一个链接并让该链接发送一个URL到
功能,以打开一个特定大小的新寡妇。我希望能够为几个链接使用相同的功能。到目前为止,我在

< script type =" text / javascript" language =" javascript">
function smallWindow(myPage){
window.open(" myPage",toolbar = 0,status = 0,directorie s = 0,menubar = 0,resizabl
e = 0,依赖= 1,宽度= 400,高度= 300);
}
What I am trying to should be everyday simple, but I just can''t seem to
grasp it.

What I want to do is click a link and have that link send a URL to a
function to open a new widow of a certain size. I want to be able to use
the same function for several links. What I have so far is this in the
head

<script type="text/javascript" language="javascript">
function smallWindow(myPage) {
window.open("myPage",toolbar=0,status=0,directorie s=0,menubar=0,resizabl
e=0,dependant=1,width=400, height=300);
}




伙计,你太近了:尝试没有变量周围的引号:


window.open(myPage等



Man, you''re so close: Try it without the quotes around the variable:

window.open(myPage, etc.




" mscir"< ms *** @ access4less.net>写在留言中

news:10 ************* @ corp .supernews.com ...

:Nom DePlume写道:

:>我想要的应该是日常简单,但我似乎不能br $> b $ b到

:>抓住它。

:>

:>我想做的是点击链接,让该链接发送一个URL到

:>函数打开一个特定大小的新寡妇。我希望能够使用 br />
:>几个链接的功能相同。到目前为止,我所拥有的是



:>头部

:>

:> < script type =" text / javascript" language =" javascript">

:> function smallWindow(myPage){

:>

window.open(" myPage",toolbar = 0,status = 0,directorie s = 0,menubar = 0 ,resizabl

:> e = 0,依赖= 1,宽度= 400,身高= 300);

:> }



:伙计,你太近了:尝试不带变量的引号:



:window.open(myPage等等)


尝试过,但它似乎没有什么区别。


Dave

---

外发邮件经过无病毒认证。

由AVG反病毒系统检查( http://www.grisoft.com)

版本:6.0.588 /病毒库:372 - 发布日期:2004年2月13日

"mscir" <ms***@access4less.net> wrote in message
news:10*************@corp.supernews.com...
: Nom DePlume wrote:
: > What I am trying to should be everyday simple, but I just can''t seem
to
: > grasp it.
: >
: > What I want to do is click a link and have that link send a URL to a
: > function to open a new widow of a certain size. I want to be able to
use
: > the same function for several links. What I have so far is this in
the
: > head
: >
: > <script type="text/javascript" language="javascript">
: > function smallWindow(myPage) {
: >
window.open("myPage",toolbar=0,status=0,directorie s=0,menubar=0,resizabl
: > e=0,dependant=1,width=400, height=300);
: > }
:
: Man, you''re so close: Try it without the quotes around the variable:
:
: window.open(myPage, etc.

Tried that, but it didnt seem to make a difference.

Dave
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.588 / Virus Database: 372 - Release Date: 2/13/2004


这篇关于老模糊的大脑试图了解的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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