当前位置: 动力学知识库 > 问答 > 编程问答 >

c# - Unexpected token illegal - Regex - MVC 3 JS

问题描述:

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>
分享给朋友:
您可能感兴趣的文章:
随机阅读: