How to include a dynamic variable in javascript element's "src" attribute
in asp.net?
i want to add a javascript file in aspx page <head> section, but this
javascript file name changes dynamically. Can i use a variable for src
attribute in script element as shown in below example
e.g., var jsFileName = "JScript1"
<script type="text/javascript" src="jsFolder/' + jsFileName + '.js"></script>
this is not working for me. Any help is appreciated.
No comments:
Post a Comment