0
我在類MyClass中創建了一個函數。此功能旨在包括樣式表和js代碼:返回多個HtmlGenericControl
Public Function myfunction() As HtmlGenericControl
Dim bootstrapmin As New HtmlGenericControl("script")
bootstrapmin.Attributes("href") = "https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js"
Return bootstrapmin
End Function
到目前爲止一切正常,其實在源代碼中包含JavaScript代碼。我的問題是:如何確保Myfunction()包含多個樣式表/ JavaScript代碼?
這樣不起作用:
Public Function test3() As HtmlGenericControl
Dim bootstrapmin As New HtmlGenericControl("script")
bootstrapmin.Attributes("src") = "https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js"
Return bootstrapmin
Dim bootstrap As New HtmlGenericControl("script")
bootstrap.Attributes("src") = "https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.js"
Return bootstrap
End Function
THANK YOU