asp.net mvc的4个选项卡 [英] asp.net mvc 4 tabs
问题描述
我的工作与Visual Studio 2010 ASP.Net MVC4(发动机观点剃刀)的一个项目,需要做一个标签。
我定义这个scrips和CSS:
I'm working on a project with Visual Studio 2010 ASP.Net MVC4 (engine view Razor) and need to make a tabs. I define this scrips and css:
<link href="@Url.Content("~/Content/themes/base/jquery-ui.css")" rel="stylesheet" type="text/css" />
<script src="@Url.Content("~/Scripts/jquery-1.7.1.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery-ui-1.8.20.min.js")" type="text/javascript"></script>
<script type="text/javascript">
$(function () {
$("#tabs").tabs();
});
</script>
它还定义了标签格式HTML:
It also defines the format html for the tabs:
<div id="tabs"> .....
但是当excecute不SHOWME的标签,我怎么能解决这个问题。只有SHOWME格式HTML,这样的:
but when excecute don't showme the tabs, how I can solve this problem. only showme format html, this:
指数
标签标题1
选项卡标题2
选项卡标题3
内容选项卡1放在这里。
Content for Tab 1 goes here.
内容选项卡2放在这里。
Content for Tab 2 goes here.
内容选项卡3放在这里。
Content for Tab 3 goes here.
推荐答案
如果您与ASP.net MVC4工作,然后配置_Layout.cshtml
添加此行入脑HTML
If you work with ASP.net MVC4 then config _Layout.cshtml add this lines into Head html
@Styles.Render("~/Content/css")
@Styles.Render("~/Content/themes/base/css")
@Scripts.Render("~/bundles/jquery")
@Scripts.Render("~/bundles/jqueryui")
@Scripts.Render("~/bundles/modernizr")
和来自身体删除(HTML)这行
and delete from body (html) this line
@Scripts.Render("~/bundles/jquery")
和执行该程序,并显示标签
and execute the program and show the tabs
这篇关于asp.net mvc的4个选项卡的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!