I am surprised that no one has yet fully utilized the jQuery chain features:
$('<div>')
.attr('spry:region','myDs')
.html('{hostname}')
.appendTo('body')
Here's an example jFiddle that shows it in action.
UPDATE
Request javascript, script . , ASP.NET script, javascript, :
- ASP.NET. - ,
yourscriptname.js.ashx. - javascript- (,
Response.Write() - ... src <script> somefile.js somefile.js.asp?filepath=your/file.path.
, javascript , "filepath", . , your/file.path - , , .