簡體   English   中英

在ASP.NET MVC 4中使用Scripts.Render時,在“script”標記中生成“type”屬性

[英]Produce a “type” attribute in the “script” tag when using Scripts.Render in ASP.NET MVC 4

是否可以在ASP.NET MVC 4中配置Scripts.Render以在“script”標記中生成“type”屬性?

如果是這樣,怎么樣?

提前致謝,

瑞安

1.1-alpha1更新支持使用Scripts / Styles幫助程序進行自己的標記格式化。

有一個新的DefaultTagFormat屬性,默認情況下設置為:

"<script src="{0}"></script>"

還有一個RenderFormat方法,它也采用標記格式。 您應該能夠通過這兩種機制中的任何一種添加type屬性。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM