首页 > 编程语言 > 详细

[JavaScript] How to use HightLight in Dojo?

时间:2014-04-06 19:26:14      阅读:579      评论:0      收藏:0      [点我收藏+]

The HightLight can help make the code blocks in the HTML more beautifully. This recipe tells you how to use this cool feature in the Dojo toolkit.

<!DOCTYPE HTML>
<html>
	<head>
		<title>Dojo Trip</title>
		<link rel="stylesheet" href="http://yandex.st/dojo/1.9.1/dojox/highlight/resources/highlight.css" />
	</head>
	<body>
		<div id="main">
			<div id="code" class="javascript">
				var name = "Dojo";			
			</div>
		
		</div>
		
		<script type="text/javascript">
			var dojoConfig = {async: false};
		</script>
		<script src="http://yandex.st/dojo/1.9.1/dojo/dojo.js"></script>
		<script type="text/javascript">
			require(["dojox/highlight/_base",‘dojo/ready‘,"dojox/highlight/widget/Code","dojox/highlight/languages/javascript"],function(highlight,ready,Code){
				ready(function(){
					new highlight.Code({},"code");
					//var code = new Code({},‘code‘);
					//code.startup();				
				});			
			});			
		</script>
	</body>
</html>



[JavaScript] How to use HightLight in Dojo?,布布扣,bubuko.com

[JavaScript] How to use HightLight in Dojo?

原文:http://blog.csdn.net/wonderfan/article/details/23032917

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!