JavaScript 能做什么?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/3387603/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-23 04:23:45  来源:igfitidea点击:

What can JavaScript do?

javascript

提问by Gooner

Hey, I am a newbie to JavaScript. I really don't know what it does.

嘿,我是 JavaScript 的新手。我真的不知道它有什么作用。

  • What can I do with JavaScript?
  • What are the possibilities of JavaScript?
  • What tools will I require to develop in JavaScript?
  • Is there some plugin available in Eclipse?
  • 我可以用 JavaScript 做什么?
  • JavaScript 有哪些可能性?
  • 使用 JavaScript 进行开发需要哪些工具?
  • Eclipse 中是否有可用的插件?

Thanks!

谢谢!

回答by Oded

Javascript is a programming language.

JavaScript 是一种编程语言。

You can do anything with it that you can do with other programming languages.

你可以用它做任何你可以用其他编程语言做的事情。

As with other languages, you need a text editor and a compiler/interpreter in order to develop with it.

与其他语言一样,您需要一个文本编辑器和一个编译器/解释器才能使用它进行开发。

It is mostly used with websites to provide better interaction than HTML can do alone and most web browsers have a built in interpreter for javascript. For security reasons, javascript in the browser is limited (so it can't directly access the filesystem, for example).

它主要与网站一起使用,以提供比 HTML 单独可以做的更好的交互,并且大多数 Web 浏览器都有内置的 javascript 解释器。出于安全原因,浏览器中的 javascript 是有限的(例如,它不能直接访问文件系统)。

See thislist of resources for further learning.

请参阅资源列表以进行进一步学习。

回答by Johan

Javascript is a programming language used, in context of web sites, to implement behavior function to a page on client side. Using HTML and CSS only, with no Javascript, you can only show things in a pre-defined way. With Javascript, you can control the way things behave.

Javascript 是一种编程语言,用于在网站上下文中实现客户端页面的行为功能。仅使用 HTML 和 CSS,不使用 Javascript,您只能以预定义的方式显示内容。使用 Javascript,您可以控制事物的行为方式。

You can use whatever text editor you like to write Javascript code, and a web browser to run it.

您可以使用任何您喜欢的文本编辑器来编写 Javascript 代码,并使用 Web 浏览器来运行它。

回答by Krishna Rana

JavaScript is well-suited for performing task within a web browser.It is primarily used to interact with users. With JavaScript you can do:

JavaScript 非常适合在 Web 浏览器中执行任务。它主要用于与用户交互。使用 JavaScript,您可以:

  • it can change HTML content, HTML styles, HTML attributes.
  • it can detect what browser a person is using and customize the webpages to their browser.
  • it can validate date.
  • perform calculation in forms.
  • validating form input.
  • interact with multiple frames.
  • 它可以更改 HTML 内容、HTML 样式、HTML 属性。
  • 它可以检测一个人正在使用什么浏览器,并根据他们的浏览器自定义网页。
  • 它可以验证日期。
  • 以表格形式进行计算。
  • 验证表单输入。
  • 与多个框架交互。