我在ASP.NET MVC 3中使用TinyMCE,但我认为这不是问题。
错误:
jquery-1.9.0.min.js:3 Uncaught ReferenceError:tinyMCE未定义
本地主机:67678 /脚本/ jQuery的1.9.0.min.js
<!-- TinyMCE -->
<script type="text/javascript" src="~/Scripts/tiny_mce/tiny_mce.js"></script>
<script type="text/javascript">
tinyMCE.init({
mode: "textareas",
theme: "simple"
});
</script>
<!-- /TinyMCE -->
<h3>
Simple theme example</h3>
<p>
This page shows you the simple theme and it's core functionality you can extend
it by changing the code use the advanced theme if you need to configure/add more
buttons etc. There are more examples on how to use TinyMCE in the <a href="http://tinymce.moxiecode.com/examples/">
Wiki</a>.
</p>
<!-- Gets replaced with TinyMCE, remember HTML in a textarea should be encoded -->
<textarea id="elm1" name="elm1" rows="15" cols="80" style="width: 80%">
<p>
This is some example text that you can edit inside the <strong>TinyMCE editor</strong>.
</p>
<p>
Nam nisi elit, cursus in rhoncus sit amet, pulvinar laoreet leo. Nam sed lectus quam, ut sagittis tellus. Quisque dignissim mauris a augue rutrum tempor. Donec vitae purus nec massa vestibulum ornare sit amet id tellus. Nunc quam mauris, fermentum nec lacinia eget, sollicitudin nec ante. Aliquam molestie volutpat dapibus. Nunc interdum viverra sodales. Morbi laoreet pulvinar gravida. Quisque ut turpis sagittis nunc accumsan vehicula. Duis elementum congue ultrices. Cras faucibus feugiat arcu quis lacinia. In hac habitasse platea dictumst. Pellentesque fermentum magna sit amet tellus varius ullamcorper. Vestibulum at urna augue, eget varius neque. Fusce facilisis venenatis dapibus. Integer non sem at arcu euismod tempor nec sed nisl. Morbi ultricies, mauris ut ultricies adipiscing, felis odio condimentum massa, et luctus est nunc nec eros.
</p>
</textarea>
<br />
<input type="submit" name="save" value="Submit" />
<input type="reset" name="reset" value="Reset" />
<script type="text/javascript">
if (document.location.protocol == 'file:') {
alert("The examples might not work properly on the local file system due to security settings in your browser. Please use a real webserver.");
}
</script>
图像:
固定:
这是有效的
../../脚本/ tiny_mce / tiny_mce.js
我的问题是为什么这不起作用?为什么VS 2010不会显示路径错误?
〜/脚本/ tiny_mce / tiny_mce.js
答案 0 :(得分:2)
正确答案 - &gt; ../../脚本/ tiny_mce / tiny_mce.js