将代码注入< head>< / head>部分 [英] Injecting code into the <head></head> section

查看:54
本文介绍了将代码注入< head>< / head>部分的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


我有一个网络用户控件,除其他外,提供打印这个页面的b $ b,并通过电子邮件发送此页面功能这个脚本是

执行点击asp:超链接


我在< SCRIPT>中有一个函数在页面的< head>< / head>

部分中阻止我想要的块。不幸的是,RegisterClientScriptBlock,

RegisterStartupScript并不总是有效,当他们这样做时,脚本是

放在< form>内标签(这对我来说似乎很愚蠢)。


无论如何,从网络用户控件插入代码到< head>

部分使用Web用户控件的页面?

- 还 -


如何调试java脚本?我正在处理的一些代码有一个

错误和小!图标在浏览器的状态栏中闪烁,然后

消失。

一如既往地谢谢!


Brian W

Hi All,

I have a web user control that, among other things, provides Print this
page, and Email this page functionality I have this script that is to
execute on the click of the asp:hyperlinks

I have a function in a <SCRIPT> block that I want in the <head></head>
section of the page. Unfortunately, RegisterClientScriptBlock,
RegisterStartupScript don''t always work, and when they do the script is
placed inside the <form> tag (this seems stupid to me).

Is there anyway, from the web user control to insert code into the <head>
section of the page using the web user control?
-- also --

How does one go about debugging java script? Some code I''m working on has an
error and the little "!" icon flashes in the status bar of the browser, then
goes away.
Thanks, as always!

Brian W

推荐答案

你有什么理由想把脚本放在< head>?这个

真的没什么区别。


HTH,


Kevin Spencer

Microsoft FrontPage MVP

互联网开发人员
http://www.takempis .com

大件物品由很多小东西组成。


" Brian W" < brianw@gold_death_2_spam_rush.com>在消息中写道

news:ec *************** @ TK2MSFTNGP10.phx.gbl ...
What reason do you have for wanting to put the script inside the <head>? It
really makes no difference.

HTH,

Kevin Spencer
Microsoft FrontPage MVP
Internet Developer
http://www.takempis.com
Big things are made up of
lots of Little things.

"Brian W" <brianw@gold_death_2_spam_rush.com> wrote in message
news:ec***************@TK2MSFTNGP10.phx.gbl...
大家好,

我有一个Web用户控件,除其他外,提供Print this
页面,并通过电子邮件发送此页面功能我有这个脚本是为了点击asp:超链接

我在< SCRIPT>中有一个函数在页面的< head>< / head>
部分中阻止我想要的块。不幸的是,RegisterClientScriptBlock,
RegisterStartupScript并不总是有效,当他们这样做时,脚本被放置在< form>内。标签(这对我来说似乎很愚蠢)。

无论如何,从Web用户控件到使用Web用户控件将代码插入页面的< head>
部分? br />
- 还 -

如何调试java脚本?我正在处理的一些代码有
的错误和小的!图标在浏览器的状态栏中闪烁,
然后消失。

一如既往地谢谢!

Brian W

Hi All,

I have a web user control that, among other things, provides Print this
page, and Email this page functionality I have this script that is to
execute on the click of the asp:hyperlinks

I have a function in a <SCRIPT> block that I want in the <head></head>
section of the page. Unfortunately, RegisterClientScriptBlock,
RegisterStartupScript don''t always work, and when they do the script is
placed inside the <form> tag (this seems stupid to me).

Is there anyway, from the web user control to insert code into the <head>
section of the page using the web user control?
-- also --

How does one go about debugging java script? Some code I''m working on has an error and the little "!" icon flashes in the status bar of the browser, then goes away.
Thanks, as always!

Brian W



要调试javascript,请在​​最新的Netscape中打开页面。页面完全加载后,输入javascript :在地址栏中查看调试器。


" Brian W" < brianw@gold_death_2_spam_rush.com>写在消息

新闻:ec ************* @ TK2MSFTNGP10.phx.gbl ...

大家好,


我有一个网络用户控件,除其他外,提供打印这个

页面,并通过电子邮件发送此页面功能我有这个脚本是为了

执行单击asp:超链接


我在< SCRIPT>中有一个函数在页面的< head>< / head>

部分中阻止我想要的块。不幸的是,RegisterClientScriptBlock,

RegisterStartupScript并不总是有效,当他们这样做时,脚本是

放在< form>内标签(这对我来说似乎很愚蠢)。


无论如何,从网络用户控件插入代码到< head>

部分使用Web用户控件的页面?

- 还 -


如何调试java脚本?我正在处理的一些代码有一个

错误和小!图标在浏览器的状态栏中闪烁,然后

消失。

一如既往地谢谢!


Brian W


To debug javascript, open the page in the latest Netscape. Once the page is
fully loaded, type "javascript:" in the address bar to view the debugger.

"Brian W" <brianw@gold_death_2_spam_rush.com> wrote in message
news:ec*************@TK2MSFTNGP10.phx.gbl...
Hi All,

I have a web user control that, among other things, provides Print this
page, and Email this page functionality I have this script that is to
execute on the click of the asp:hyperlinks

I have a function in a <SCRIPT> block that I want in the <head></head>
section of the page. Unfortunately, RegisterClientScriptBlock,
RegisterStartupScript don''t always work, and when they do the script is
placed inside the <form> tag (this seems stupid to me).

Is there anyway, from the web user control to insert code into the <head>
section of the page using the web user control?
-- also --

How does one go about debugging java script? Some code I''m working on has an
error and the little "!" icon flashes in the status bar of the browser, then
goes away.
Thanks, as always!

Brian W



对于javascript调试,请确保将IE设置设置为启用

调试并显示通知关于每一个错误。这是在高级选项卡上的工具菜单上的

选项。


我也没有看到脚本进入的特定原因HEAD部分。

你能解释一下你想要做什么,你认为

需要这个吗?


Brian W < brianw@gold_death_2_spam_rush.com>在消息中写道

news:ec *************** @ TK2MSFTNGP10.phx.gbl ...
For javascript debugging, make sure you have your IE settings set to enable
debugging and to display a notification about every error. This is in
Option on the Tools menu on the Advanced tab.

I also don''t see a specific reason for the script to be in the HEAD section.
Can you please explain what it is you are trying to do, that you think
requires this?

"Brian W" <brianw@gold_death_2_spam_rush.com> wrote in message
news:ec***************@TK2MSFTNGP10.phx.gbl...
大家好,

我有一个Web用户控件,除其他外,提供Print this
页面,并通过电子邮件发送此页面功能我有这个脚本是为了点击asp:超链接

我在< SCRIPT>中有一个函数在页面的< head>< / head>
部分中阻止我想要的块。不幸的是,RegisterClientScriptBlock,
RegisterStartupScript并不总是有效,当他们这样做时,脚本被放置在< form>内。标签(这对我来说似乎很愚蠢)。

无论如何,从Web用户控件到使用Web用户控件将代码插入页面的< head>
部分? br />
- 还 -

如何调试java脚本?我正在处理的一些代码有
的错误和小的!图标在浏览器的状态栏中闪烁,
然后消失。

一如既往地谢谢!

Brian W

Hi All,

I have a web user control that, among other things, provides Print this
page, and Email this page functionality I have this script that is to
execute on the click of the asp:hyperlinks

I have a function in a <SCRIPT> block that I want in the <head></head>
section of the page. Unfortunately, RegisterClientScriptBlock,
RegisterStartupScript don''t always work, and when they do the script is
placed inside the <form> tag (this seems stupid to me).

Is there anyway, from the web user control to insert code into the <head>
section of the page using the web user control?
-- also --

How does one go about debugging java script? Some code I''m working on has an error and the little "!" icon flashes in the status bar of the browser, then goes away.
Thanks, as always!

Brian W



这篇关于将代码注入&lt; head&gt;&lt; / head&gt;部分的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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