问题描述:

I would like to know why some times code is not in one line and what I have to do to fix it? (Problem with regex?) It is look like this:

**var PelnyOpisEdytuj = '@Model.PelnyOpis';**

Problem example:

网友答案:

I found solution maybe is not perfect but work correct. I created div with argument and later I take data. There was problem with regex.

<div id="DivExample" style="display: none;">
@Html.Raw(@Model.ExampleText)
</div>
<script type="text/javascript">
    //komenatatz zapytanie
    var DivExampleData= $('#DivExample').text();
</script>
相关阅读:
Top