简体   繁体   中英

jQuery script being rendered instead of executed

In a legacy application I'm working, somehow the jQuery scripts between

<script type="text/javascript"></script>

are being rendered as plain text instead of being executed.

Does someone have a suggestion of what can cause this behavior?

如果您使用的是style: {display:block}东西,它将表现为这种风格。

Since we can not see all your code I will give you a few possible causes. 1.you could have forgot a closing tag for an element above it. 2.You could have forgot a pair of parenthesis on an element above. 3.You might have put the tag in a wrong spot so it might print depending on it's position.

Try to disable css. If it works fine after it, then you've styled tag 'script'.

Remember to read how to ask a question here on StackOverflow

But based on the little information given i'll make a longshot and think it might be something with parsing, read about CDATA

And check for unclosed html tags .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM