在Jquery中动态查看HTML代码和设计 [英] Dynamically Viewing of HTML Code and Design in Jquery

查看:72
本文介绍了在Jquery中动态查看HTML代码和设计的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



在此先感谢,

我的任务是在Jquery中动态查看HTML代码和设计(就像在Asp.Net IDE中,我们具有设计和代码"视图一样).我想用C#和JqueryUI在Asp.net中开发它.请帮助我....

Hi,

thanks in Advance,

I have been tasked for Dynamically Viewing of HTML Code and Design in Jquery (Like in our Asp.Net IDE we have Design and Code view). I want to develop this in Asp.net with C# and JqueryUI. Please help me....

推荐答案



这是一些基本思路,可能会对您有所帮助,

1)创建任何html文件后,将其存储在服务器文件夹中.
2)您可以使用System.IO读取文件内容并将其显示在任何WYSIWYG(所见即所得)中.
3)您可以使用iFrame或WYSIWYG控件以html页面查看.



您可以购买此付费的电视编辑器
Hi,

here is some basic idea, this may help you,

1) once you create any html file store it on server folder.
2) you can use System.IO to read file content and display it in any WYSIWYG(What you see is what you get).
3) you can use iFrame or WYSIWYG control to view as html page.

Or

you can purchase this paid Teleric Editor or FCK Editor

Thanks
-Amit.


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Index Page</title>

<script type="text/javascript">

function page_load()
{
	var html_val=document.getElementById("text_area_id").value;	
	var iframe = document.getElementById('frame_1');
        var doc = iframe.contentDocument || iframe.contentWindow.document;
        doc.body.innerHTML = html_val;	
}

</script>

</head>
<body  önload="page_load();">
<div style="float:left; width:50%;">
<textarea id="text_area_id" style="width:500px; height:400px; overflow:visible;">

<h1 style="color:#66FFFF;">hello</h1>

<p style="color:#CC0066;">Its a test</p>

</textarea>
<br />
<br />
<br />
<br />
<br />
<button  önclick="page_load();">Click it to execute output</button>
</div>

<div style="float:right; width:50%;">
<iframe id="frame_1" style="width:100%; height:400px;">
<html>
<head>

</head>
<body>

</body>
</html>
</iframe>

</div>


</body>

</html>


这篇关于在Jquery中动态查看HTML代码和设计的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆