我讨厌javascript :-( [英] I hate javascript :-(

查看:101
本文介绍了我讨厌javascript :-(的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗯,我能说什么......我真的很讨厌Javascript。


我不是编程专业,但我有时会使用PHP与

MySQL,ASP与Ms Access / SQL Server。当我和C一起工作时,我已经用VB做了一些事情和




但是Javascript会发生什么,它没有其他语言。


我使用WinXP SP2& IIS5,现在。但是对于Win2k和win98,就像我记得的那样,它是相同的。我总是让我的电脑更新

微软更新。


如果我需要使用Javascript(我尽量避免使用它,但是当它是

必要......),我通常从互联网上复制一些文件,而不是自己重新发明轮子的
。拿这个脚本,例如,一个

典型的表单验证器:
http://willmaster.com/possibilities/...edFieldsCheck/


但也可能是另一个脚本,它对什么<没有区别br />
发生。


我在网上尝试它可行,我将文件下载到我的硬盘上。好的,

它有效。我将脚本复制到我的文件中,它根本不起作用。好吧,

我可能犯了一个错误......没办法理解是什么....

我不附上我的文件,因为我的档案不是问题。


我再次运行从互联网上下载的文件......它不会再次使用
工作!!!!它给出了一个错误信息...为什么如果它之前工作

而我还没有编辑它?!?

错误信息并不重要:它是其中之一那些IE'的黄色

三角形警报,指的是不存在的行和列。而你永远不会理解是什么。


我重新启动电脑和同样的故事。原始文件下载工作,我的

文件不起作用(在我的情况下没有任何错误信息)和

原始下载文件后不再工作!! !!


javascript到底发生了什么?它挂起了IIS服务吗?

函数是否卡在缓存中?


如何避免这种情况发生。我怎么能像我一样调试我的脚本

所有其他的scrips /语言:没有重启第一个错误

消息?


这真的令人失望:昨天我设法在几个小时内设置了一个webform +

页面的ASP + MS Access结果今天我被困了所有

天用Javascript中的愚蠢表单验证程序。


感谢您的意见和建议。


Fabian

解决方案

Fabian写道:

一个长长的呜咽故事




最初让整个DOM围绕整个DOM的事情真的是一个错误。

我仍​​然讨厌JavaScript(因为我还在学习)但它只是太多

有用无视。


Fabian说:

javascript到底发生了什么?它是否挂起了IIS服务?
该功能是否卡在缓存中?

如何避免这种情况发生。我如何调试我的脚本,就像我所做的那样所有其他的scrips /语言:没有重启第一个错误
消息?



可能是最大的区别Javascript和其他语言

是你要找到的大多数Javascript代码示例

开始时都很糟糕,需要一定程度的自定义来制作

他们使用你的HTML。


如果你不愿意理解这种语言,不要使用它,或者

最少不要抱怨当你无法下载工作的垃圾。




嗯,首先,你是复制/粘贴,所以,不是代码

不起作用,它有效,只是你没有写它,你''不是

作者,关于这一点,我们无法向您询问有关代码问题的任何内容或

我们要做什么,现在,我们,对于任何查询或解决问题在它上面需要

它的作者,没有做复制/粘贴的家伙,Javascript是Cish,

所以,如果你确实知道C,应该'不成问题,PHP有点Perlish

所以是Javascript,所以,如果你确实知道PHP那么好,你可以

告诉几乎是什么js正在做。


我已经看过那些复制/粘贴的交易,通常是,fella复制/粘贴一个

几个< script>一个页面中的块,每个块都有自己的本地变量

每个函数和/或它们自己的全局变量,所有本地都属于

容器范围,通常是一个函数,但是取决于运行时它可以与另一个具有相同名称的函数上的另一个变量碰撞,或者b / b $ b b分支或通过

递归或一些事件监听器,但我经常看到的是,全局

命名问题,每个< script> block定义一些全局变量和所有全局变量

随着SAME范围而下降,因此,一个块定义为全局,可能重新定义

或在另一个块上重新分配。再说一次,你不是它的作者。如果你没有从

文件到另一个文件进行审核,你可以用任何语言获得相同的语言。

Danny
On Sun,2005年6月26日10:14:21 -0700,Fabian< ne ****** @ hotmail.com>写道:

好吧,我能说什么...我真的很讨厌Javascript。

我不是编程专业,但我有时会使用PHP与<带有Ms Access / SQL Server的MySQL,ASP。我在VB工作时做了一些事情。
当我和C一起工作的时候。

但Javascript会发生什么,它没有其他语言。

我使用WinXP SP2& IIS5,现在。但是对于Win2k和win98,就像我记得的那样,它是一样的。我总是用微软的更新来更新我的电脑。

如果我需要使用Javascript(我尽量避免使用它,但是当它需要时......),我通常会从互联网上复制一些文件,而不是自己重新发明轮子。以此脚本为例,一个典型的表单验证器:
http://willmaster.com/possibilities/...edFieldsCheck/

但也可能是另一个脚本,对于
发生的事情没有任何区别。

我在网上尝试它可行,我将文件下载到我的硬盘上。好的,
它的工作原理。我将脚本复制到我的文件中,它根本不起作用。好吧,
我可能犯了一个错误......没办法理解是什么....
我不附上我的文件,因为我的档案不是问题。
我再次运行从互联网上下载的文件......它不再工作了!它给出了一条错误信息...为什么如果它之前正在工作?我还没有编辑它?!?
错误信息并不重要:它是那些IE的黄色之一/>三角形警报,指的是未显示的行和列。你永远不会理解它的含义。

我重新启动电脑和同样的故事。下载的原始文件有效,我的
文件不起作用(在我的情况下没有任何错误信息)并且
原始下载的文件在此之后不再起作用!!!!

javascript到底发生了什么?它是否挂起了IIS服务?
该功能是否卡在缓存中?

如何避免这种情况发生。我怎么能像我一样调试我的脚本呢?所有其他的文档/语言:没有重启第一个错误
消息?

这真的很令人失望:昨天我设法在几个小时内建立一个webform +
页面结果ASP + MS Access今天我在Javascript中用一个愚蠢的表单验证器卡住了所有
天。

谢谢为您的想法和建议。

Fabian




-

使用Opera的革命性电子邮件客户: http://www.opera.com/mail/


Well, what can I say...I really hate Javascript.

I am not programming as profession but I sometimes work with PHP with
MySQL, ASP with Ms Access/SQL Server. I have done something in VB and
when I was jounger I worked with C.

But what happens with Javascript, it happens with no other language.

I work with WinXP SP2 & IIS5, now. But also with Win2k and win98, as
fas as I remember, it was the same. I always keep my PC updated with
Microsoft updates.

If I need to work with Javascript (I try to avoid it, but when it is
necessary...), I normally copy some files from the Internet for not
having to reinvent the wheel myself. Take this script, for example, a
typical form verifier:
http://willmaster.com/possibilities/...edFieldsCheck/

but could also be another script, it makes no difference for what
happens.

I try it online and it works, I download the file to my hard disk. Ok,
it works. I copy the script to my file and it does NOT work at all. Ok,
I might have made a mistake...no way to understand what....
I do not attach here my file because my file is not the problem.

I run again the file downloaded from the internet and...it does not
work any longer !!!! It gives an error message...why if it was working
before and I have not edited it?!?
The error message is not important: it is one of those IE''s yellow
triangle alert that refer to unexisting row and column. And you never
understand what''s about.

I reboot the PC and same story. The original file downloaded works, my
files does not work (wihout any error message in my case) and the
orginal downloaded file does not work any longer after that!!!!

What the hell happens with javascript? Does it hangs the IIS service?
Does the function get stuck in the cache?

How can I avoid this to happen. How can I debug my scripts as I do for
all the others scrips/languages: without rebooting at the first error
message?

It''s really disappointing: yesterday I managed to set up a webform +
page results in ASP + MS Access in a few hours and today I am stuck all
day with a stupid form verifier in Javascript.

Thanks for your ideas and suggestions.

Fabian

解决方案

Fabian wrote:

A long sob story



Initially It really is a bugga to get ones head around the whole DOM thing.
I still hate JavaScript (as I am still learning) but it''s just too
useful to disregard.


Fabian said:

What the hell happens with javascript? Does it hangs the IIS service?
Does the function get stuck in the cache?

How can I avoid this to happen. How can I debug my scripts as I do for
all the others scrips/languages: without rebooting at the first error
message?


Probably the biggest difference between Javascript and other languages
is that most of the examples of Javascript code you''re going to find
are bad to begin with and require some degree of customization to make
them work with your HTML.

If you''re not willing to understand the language, don''t use it, or at
least don''t complain when you can''t get crap you downloaded to work.



Well, for one thing, you ARE copying/pasting, so, is not that the code
doesn''t work, it works, it just that you didn''t write it, you''re not the
author and on that, we cannot query you on anything on the code issues or
what it''s there to do, now, we, for any querying or addressing on it need
the author of it, no the fella doing the copy/pasting, Javascript is Cish,
so, if you do in fact know C, shouldn''t be an issue, PHP is a bit Perlish
and so is Javascript, so, if you do in fact know PHP that well, you can
tell pretty much what js is doing.

I''ve seen those copy/pasted deals, usually is, the fella copy/paste a
few <script> blocks in a page, and each block has their own locals vars
per function and/or their own globals, all locals fall within the
container scope, usually a function, but depending on the runtime it can
collide with another variable on another function with the same name or
branching or addressing the same object over the same runtime over a
recursion or some event listener, but what I''ve seen often is, global
naming issues, each <script> block define some globals and all globals
fall withing the SAME scope, so, one block defined global, maybe redefined
or reassigned on another. Then again, you''re not the author of it. You''d
get the same in any language if you plaster around without auditing from a
file to another.
Danny
On Sun, 26 Jun 2005 10:14:21 -0700, Fabian <ne******@hotmail.com> wrote:

Well, what can I say...I really hate Javascript.

I am not programming as profession but I sometimes work with PHP with
MySQL, ASP with Ms Access/SQL Server. I have done something in VB and
when I was jounger I worked with C.

But what happens with Javascript, it happens with no other language.

I work with WinXP SP2 & IIS5, now. But also with Win2k and win98, as
fas as I remember, it was the same. I always keep my PC updated with
Microsoft updates.

If I need to work with Javascript (I try to avoid it, but when it is
necessary...), I normally copy some files from the Internet for not
having to reinvent the wheel myself. Take this script, for example, a
typical form verifier:
http://willmaster.com/possibilities/...edFieldsCheck/

but could also be another script, it makes no difference for what
happens.

I try it online and it works, I download the file to my hard disk. Ok,
it works. I copy the script to my file and it does NOT work at all. Ok,
I might have made a mistake...no way to understand what....
I do not attach here my file because my file is not the problem.

I run again the file downloaded from the internet and...it does not
work any longer !!!! It gives an error message...why if it was working
before and I have not edited it?!?
The error message is not important: it is one of those IE''s yellow
triangle alert that refer to unexisting row and column. And you never
understand what''s about.

I reboot the PC and same story. The original file downloaded works, my
files does not work (wihout any error message in my case) and the
orginal downloaded file does not work any longer after that!!!!

What the hell happens with javascript? Does it hangs the IIS service?
Does the function get stuck in the cache?

How can I avoid this to happen. How can I debug my scripts as I do for
all the others scrips/languages: without rebooting at the first error
message?

It''s really disappointing: yesterday I managed to set up a webform +
page results in ASP + MS Access in a few hours and today I am stuck all
day with a stupid form verifier in Javascript.

Thanks for your ideas and suggestions.

Fabian



--
Using Opera''s revolutionary e-mail client: http://www.opera.com/mail/


这篇关于我讨厌javascript :-(的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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