条件编译已关闭 [英] conditional compilation is turned off

查看:62
本文介绍了条件编译已关闭的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


这是什么意思?

以下脚本引发了主题警报。


< p>< a href =" javascript :void();"

onClick =" mailto:sg ***** @ cyberus .ca?Subject = BRITTAN Y& nbsp; WORKSHOP">


< img align = left src =" britany.gif"宽度= QUOT; 231"高度= QUOT; 40" border = 0

alt =" BRITTANY WORKSHOP
与Sylvio Gagnon style =" text-indent:.2em;

background:ffffff;颜色:bb5500;">

< / a>< / p>


Jean Pierre Daviau

解决方案

"Québec < JP ** @ vidn.ca>写道:

这是什么意思?


什么? (即,不要在主题中放置您的信息的重要部分,

它让读者感到困惑)。

以下脚本引发了主题警报。
< p>< a href =" javascript :void();"
onClick =" mailto:sg ***** @ cyberus.ca ?主题= BRITTAN Y& nbsp; WORKSHOP">




除了使用javscript:-URLs之外,建议不要这样做,

href在语法上是不正确的Javascript。 无效运算符是

不是函数,它需要一个表达式。


onclick属性值应该包含javascript,而是

包含mailto:-URL(也建议反对,至少不要依赖

用户可以使用它)。


条件编译是IE使用其脚本编写的东西。我猜

它是@在触发警报的onclick属性值中。


/ L

-

Lasse Reichstein Nielsen - lr*@hotpop.com

DHTML死亡颜色:< URL:http://www.infimum.dk/HTML/rasterTriangleDOM .html>

''没有判断的信仰只会降低精神神圣。''


interpereter需要onClick处理程序中的JavaScript代码。

这个mailto地址看起来像一个单独的条件分配

x =(条件)?y:z

所以它试图处理这个分配并且天真地惨不忍睹,

这是错误信息的来源。


正确的方法是(你根本不需要任何脚本):

< a href =" mailto:sg ***** @ cyberus.ca?subject=BRITTANY%2 0WORKSHOP">发送

电子邮件< / a>


记住主题的URLEncode(转义)文本是非常重要的br />
和正文。

特别是所有空格必须由%20替换,所有行

突破%0D%0A


VK写道:

正确的方法是(你根本不需要任何脚本):
< ; a href =" mailto:sg ***** @ cyberus.ca?subject=BRITTANY%2 0WORKSHOP">发送
电子邮件< / a>




需要注意的是,此类超链接依赖于一个电子邮件客户端

为HTTP用户代理配置*了解*`mailto:''URIs,
,不包括许多仅使用网络界面发送电子邮件的访问者。

因此,应该使用服务器端表单管理器的反馈表

申请表可能。 BTW,一个易于配置和(对于

非商业用途)免费的表单管理器,不需要CGI支持

为您的网站空间,可以在 http://formmailer.com/

PointedEars


Hi every body,

What does that mean?
The following script raises the subject alarm.

<p><a href="javascript:void();"
onClick="mailto:sg*****@cyberus.ca?Subject=BRITTAN Y&nbsp;WORKSHOP">

<img align=left src="britany.gif" width="231" height="40" border=0
alt="BRITTANY WORKSHOP with Sylvio Gagnon" style="text-indent: .2em;
background:ffffff; color:bb5500;">
</a></p>

Jean Pierre Daviau

解决方案

"Québec" <jp**@vidn.ca> writes:

What does that mean?
What? (I.e., don''t put an essential part of your message in the subject,
it is confuzing to readers).
The following script raises the subject alarm. <p><a href="javascript:void();"
onClick="mailto:sg*****@cyberus.ca?Subject=BRITTAN Y&nbsp;WORKSHOP">



Apart from using javscript:-URLs at all, which is recommended against,
the href is syntactically incorrect Javascript. The "void" operator is
not a function, it needs an expression after it.

The onclick attribute value should contain javascript, but instead
contains a mailto:-URL (also recommended against, at least don''t rely on
the user being able to use it).

Conditional compilation is something IE uses with its scripting. I guess
it is the "@" in the onclick attribute value that triggers the alert.

/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
''Faith without judgement merely degrades the spirit divine.''


The interpereter expects a JavaScript code in the onClick handler.
This mailto address looks like a uniline conditional assignement
x=(condition)?y:z
So it tries to process this assignement and eveidently falls miserably,
this is the source of the error message.

The right way is (you don''t need any script here at all):
<a href="mailto:sg*****@cyberus.ca?subject=BRITTANY%2 0WORKSHOP">Send
e-mail</a>

It''s very important to remember to URLEncode (escape) text for subject
and body.
In the particular all spaces have to be replaced by %20 and all line
breaks by %0D%0A


VK wrote:

The right way is (you don''t need any script here at all):
<a href="mailto:sg*****@cyberus.ca?subject=BRITTANY%2 0WORKSHOP">Send
e-mail</a>



And it is to be noted that such hyperlinks depend on an e-mail client
configured for the HTTP user agent that *understands* `mailto:'' URIs,
which excludes many visitors using only web interfaces for their e-mail.
One should therefore use a feedback form utilizing a server-side formmailer
application where possible. BTW, an easily configurable and (for
non-commercial use) free formmailer that does not require CGI support
for your webspace, can be found at http://formmailer.com/
PointedEars


这篇关于条件编译已关闭的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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