简体   繁体   English

在javascript中,什么是沙箱? 我该怎么做? 我该如何使用?

[英]in javascript what is a sandbox? how do i make one? how do i use it?

I have an assignment to create a sandbox to explore jQuery. 我的任务是创建一个沙箱来探索jQuery。 I missed class that day and my web design book literally says nothing about it. 那天我错过了课程,而我的网页设计书却丝毫没有提及。 I have tried to look it up and I sort of understand it tests the code or something, but really don't see a solid explanation on what it is or how to make one. 我已经尝试过查找它,并且我有点理解它可以测试代码或某些东西,但实际上并没有看到关于它是什么或如何制作的可靠解释。 keep in mind I am completely new with JavaScript and jQuery, so simplified answers would be appreciated. 请记住,我对JavaScript和jQuery完全陌生,因此希望得到简化的答案。 What is a sandbox? 什么是沙盒? How do I implement one in jQuery? 如何在jQuery中实现一个? (I am just adding useless text at this point because stack exchange refuses to let me post for some odd reason I am assuming that it is because the description is too short). (我现在只是添加无用的文本,因为堆栈交换由于某种奇怪的原因而拒绝让我发布,我认为这是因为描述太短了)。

There isn't a canonical definition of the word 'sandbox' in this context which is why you couldn't find one by searching. 在这种情况下,“沙盒”一词没有规范的定义,这就是为什么无法通过搜索找到沙盒的原因。 In this case a sandbox probably means setting up a local webserver on your laptop/desktop so you can start playing with building your own sites; 在这种情况下,沙盒可能意味着在笔记本电脑/台式机上设置本地网络服务器,以便您可以开始构建自己的网站。 plenty of tutorials on this process exist. 存在有关此过程的大量教程。 It can also in the context of javascript refer to the mediator/facade pattern in the three-tier architecture popularized by Nicholas Zakas. 在javascript的上下文中,它也可以引用Nicholas Zakas流行的三层体系结构中的中介器/外观模式。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM