It actually is very much possible with the following:
var hello = "Great Job!";
var text = "@Html.ActionLink( "Link text", "Action Name", new { id = "JSVar" })"
text = text.replace("JSVar",hello);
As easy as that! :)
All the @Html.Action link does is create a url string so doing replace on it is the same as replace on any javascript string
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…