简单的功能不会开火 [英] Simple function won't fire

查看:67
本文介绍了简单的功能不会开火的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

无论我做什么,我都无法得到这个警报。让我发疯。

一个人不等于两个......是吗?


< html>

< ; head>

< title> Rider Survey< / title>

< link rel =" stylesheet"类型= QUOT;文本/ CSS" href =" ez.css">

< meta http-equiv =" Content-Type" content =" text / html;

charset = iso-8859-1">

< script type =" text / javascript">

<! - 从奇怪的浏览器中隐藏

功能Checkcheck(){

If(1!= 2){

警告(此警报终于出现了!;

返回false;}

否则{return true;}

}

//停止隐藏 - >

< / script>

< / head>


该函数是从onsubmit调用的。在表格标签中,即

< form name =" survey"行动= QUOT; gdform.asp"方法= QUOT; POST" onsubmit =" return

Checkcheck();">


每次提交时都不应该显示警报。单击按钮?我到目前为止还没见过
。怎么了?

I can''t get this alert to show no matter what I do. Making me crazy.
One doesn''t equal two...does it?

<html>
<head>
<title>Rider Survey</title>
<link rel="stylesheet" type="text/css" href="ez.css">
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
<script type="text/javascript">
<!-- Hide from odd browsers
function Checkcheck(){
If (1 != 2){
alert("This alert finally came up!");
return false;}
Else {return true;}
}
// stop hiding -->
</script>
</head>

The function is called from an "onsubmit" in the form tag, ie
<form name="survey" action="gdform.asp" method="POST" onsubmit="return
Checkcheck();">

Shouldn''t the alert show every time the "Submit" button is clicked? I
haven''t seen it so far. What up?

推荐答案

嗨Rod,

你确定它是''如果和 否则而不是如果和否则?


希望有所帮助。


问候,

QC。

Hi Rod,
Are you sure it''s " If " and " Else " rather than " if " and " else "?

Hope that helps.

Regards,
QC.


Quitchat于2006年4月23日在comp.lang.javascript中写道
Quitchat wrote on 23 apr 2006 in comp.lang.javascript:
嗨Rod,
你确定它是''如果和 否则而不是如果和否则?
Hi Rod,
Are you sure it''s " If " and " Else " rather than " if " and " else "?




请引用您要回复的内容。


如果您想通过群组发布后续内容。 google.com,不要使用

回复链接在文章的底部。点击显示选项在文章顶部的

,然后点击回复按钮。在文章的底部

标题。 < http://www.safalra.com/special/googlegroupsreply/>


-

Evertjan。

荷兰。

(请将x''es更改为我的电子邮件地址中的点数)



Please quote what you are replying to.

If you want to post a followup via groups.google.com, don''t use the
"Reply" link at the bottom of the article. Click on "show options" at the
top of the article, then click on the "Reply" at the bottom of the article
headers. <http://www.safalra.com/special/googlegroupsreply/>

--
Evertjan.
The Netherlands.
(Please change the x''es to dots in my emailaddress)


Rod在4/23/2006上说了以下内容1:17 AM:
Rod said the following on 4/23/2006 1:17 AM:
无论我做什么,我都无法得到这个警报。让我发疯。
一个人不等于两个......是吗?

< html>
< head>
< title> Rider调查< / title>
< link rel =" stylesheet"类型= QUOT;文本/ CSS" href =" ez.css">
< meta http-equiv =" Content-Type" content =" text / html;
charset = iso-8859-1">
< script type =" text / javascript">
<! - 隐藏自奇怪的浏览器


我认为这是我第一次看到它们被称为奇怪的浏览器

功能Checkcheck(){
如果(1!= 2){


如果!=如果

警告(此警报终于出现了!);
返回false;}
Else {return true;}
I can''t get this alert to show no matter what I do. Making me crazy.
One doesn''t equal two...does it?

<html>
<head>
<title>Rider Survey</title>
<link rel="stylesheet" type="text/css" href="ez.css">
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
<script type="text/javascript">
<!-- Hide from odd browsers
I think that is the first time I have ever seen them called "odd browsers"
function Checkcheck(){
If (1 != 2){
If != if
alert("This alert finally came up!");
return false;}
Else {return true;}




Else!= else


案件事。


-

兰迪

comp.lang.javascript常见问题 - http://jibbering.com/faq &新闻组每周

Javascript最佳实践 - http://www.JavascriptToolbox .com / bestpractices /



Else != else

Case matters.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/


这篇关于简单的功能不会开火的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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