Visual Studio 2010中CSS和JavaScript的失败 [英] Failure of CSS and javascript in Visual Studio 2010

查看:99
本文介绍了Visual Studio 2010中CSS和JavaScript的失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在aspx页面的源代码视图中,css和javascript标签无效。它显示找不到文件。请解决问题..

In source view on an aspx page css and javascript tags are not working. it is showing "File Not Found". Please solve the problem..

推荐答案

如果你有这样的结构



/index.aspx

/subdir/page2.aspx

/css/style.css

/js/myjs.js







然后在index.aspx上如果你想添加链接到js和css

你可以添加喜欢



If you have structure like this

/index.aspx
/subdir/page2.aspx
/css/style.css
/js/myjs.js



then on index.aspx if you want to add the link to js and css
you can add like

<link rel="stylesheet" type="text/css" href="css/style.css" />





如果你想在page2.aspx上添加

你可以这样添加





And if you want to add on page2.aspx
you can add like this

<link rel="stylesheet" type="text/css" href="../css/style.css" />





相同的将是fr js。您可以修复链接,我认为它适合您。如果您还有其他问题,则必须在此提供代码以便更好地理解。



Same will go fr js. You can fix the links and i think it will work for you. If you are having anyother issue other than this you must provide the code here for better understanding.


这篇关于Visual Studio 2010中CSS和JavaScript的失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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