alert()函数的源代码 [英] source code for the alert() function

查看:412
本文介绍了alert()函数的源代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Javascript(window对象的方法)中默认alert()函数的源代码是什么?我正在尝试自己编写一个警报功能,所以我真的很想看看原来的功能代码。谷歌很难搞定。

What is the source code for the default alert() function in Javascript(method of the window object)? I am trying to write an alert function myself so I would really like to get a peek at the original function code.It is so hard to google it.

推荐答案

alert()函数与许多其他标准函数一样,是浏览器Javascript运行时的一部分。它无法使用Javascript代码复制(除了通过调用 alert()),并且该函数没有与平台无关的Javascript源代码。

The alert() function, like a number of other standard functions, is a part of the browser's Javascript runtime. It cannot be replicated with Javascript code (other than by calling alert()), and there is no platform-independent Javascript source code to the function.

这篇关于alert()函数的源代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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