简体   繁体   English

来自ASP.NET的<%@ Register TagPrefix =“ widget”…是否以纯HTML或javascript存在?

[英]Does <%@ Register TagPrefix=“widget”… from ASP.NET exist in pure HTML or javascript?

I want to develop some widgets like asp.net (ascx) in pure html + javascript. 我想用纯html + javascript开发一些asp.net(ascx)之类的小部件。 Does it exist in pure html (or java jsf)? 它是否存在于纯HTML(或Java jsf)中?

<%@ Register TagPrefix="widget" TagName="widget_de_prueba" Src="~/widgets/widget_test.ascx"%>
<widget:widget_de_prueba ID="someWidget" runat="server" color_fondo="white"
ancho="200px" largo="150px" mensaje="hola" postMensaje="mundo"/>

That is all asp.net webforms code (read: server-side). 那就是所有的asp.net Webforms代码(阅读:服务器端)。 It's up to the control to decide how to render, whether HTML, JavaScript, CSS or some combination of the 3. 由控件决定如何呈现,是HTML,JavaScript,CSS还是3的某种组合。

no. 没有。 that is not valid html. 无效的html。 If you are looking for that sort of thing in vanilla HTML and JavaScript I'd recommend looking into custom web components or using a framework like Polymer. 如果您要在普通HTML和JavaScript中寻找这种东西,我建议您研究自定义Web组件或使用类似Polymer的框架。

https://developer.mozilla.org/en-US/docs/Web/Web_Components https://developer.mozilla.org/zh-CN/docs/Web/Web_Components

https://www.webcomponents.org/ https://www.webcomponents.org/

https://www.polymer-project.org/ https://www.polymer-project.org/

(you don't need to use polymer to make custom web components, but it helps with the browser support and has some nice features.) (您无需使用聚合物来制作自定义Web组件,但它可以帮助支持浏览器并具有一些不错的功能。)

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

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