简体   繁体   English

Visual Studio 2013中的HTML和JavaScript

[英]Html and javascript in visual studio 2013

i have been working with visual studio for variety of projects for quite a while now, bu ti recently needed to develop a simple html5 webpage that will use some embedded or a seperate file of javascript, now i know there are asp.net projects which support stuff like that but i wanted to know is there a template or project type or something using which i can work purely with html and js only without having to deal with hell of asp.net configs and pages and all that? 我已经与Visual Studio合作处理各种项目已有一段时间了,但是bu ti最近需要开发一个简单的html5网页,该网页将使用一些嵌入式或单独的javascript文件,现在我知道有支持的asp.net项目诸如此类的东西,但我想知道是否有模板或项目类型,或者可以使用它仅与html和js一起使用而无需处理asp.net配置和页面等所有问题的模板或项目类型? just simple html5 and js dev with intellisense and maybe a designer mode for css. 只是具有intellisense的简单html5和js开发人员,并且可能是CSS的设计器模式。 i looked over internet and am unable to find an exact answer. 我查看了互联网,无法找到确切的答案。 Regards. 问候。

If you're starting from scratch you can go to File > New > Web Site and choose ASP.NET Empty Web Site. 如果从头开始,则可以转到“文件”>“新建”>“网站”,然后选择“ ASP.NET空网站”。 This will give you a very basic site, which has nothing but a Web.config file. 这将为您提供一个非常基本的站点,该站点仅包含一个Web.config文件。 You can then add all of your html, js, and css from there. 然后,您可以从此处添加所有html,js和css。 You can also delete the Web.config file, but it is useful as it allows you to continue to use the debugger on your site. 您也可以删除Web.config文件,但是它很有用,因为它允许您继续在站点上使用调试器。

Alternatively you can just start the project in windows explorer, setup the basic files and site directories, then you can go back into Visual Studio, and go to File > Open > Website and then locate the directory your site is in. This will just open the files and allow you to work on them like any other project. 或者,您可以仅在Windows资源管理器中启动项目,设置基本文件和站点目录,然后可以返回Visual Studio,然后转到“文件”>“打开”>“网站”,然后找到您的站点所在的目录。这将打开文件,并允许您像处理其他任何项目一样对它们进行处理。

These are the only ways I've seen so far, you may also be able to find project templates online but I haven't looked. 这些是我到目前为止所见的唯一方法,您也许也可以在线找到项目模板,但我没有看。

Also, if you're using Visual Studio in this way, then I recommend installing Web Essentials it adds a lot of useful features. 另外,如果您以这种方式使用Visual Studio,那么我建议安装Web Essentials,它会添加许多有用的功能。

Hope that helps. 希望能有所帮助。

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

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