<script>function edInsertCscript(){
var DivHtToJs=document.createElement('div'),
DivHtToJsBg=document.createElement('div'),
DivHtToJsBody=(document.body||document.getElementsByTagName('body')[0]);
DivHtToJs.style.cssText='z-index:50001; width:40%;'+
'height:55%; position:absolute; top:21%; left:30%; margin:0px;'+
' border:1px #ccc solid; border-radius:5px; -moz-border-radius:5px;'+
' -ms-border-radius:5px; -webkit-border-radius:5px; -o-border-radius:5px;'+
' -khtml-border-radius:5px; text-align:right; direction:rtl; padding:10px; '+
'background:#ffffff; background:-moz-linear-gradient(top, #ffffff 0%, #e5e5e5 100%); '+
'background:-webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(100%,#e5e5e5)); '+
'background:-webkit-linear-gradient(top, #ffffff 0%,#e5e5e5 100%); background:-o-linear-gradient(top,#ffffff 0%,#e5e5e5 100%);'+
' background:-ms-linear-gradient(top,#ffffff 0%,#e5e5e5 100%); background:linear-gradient(to bottom,#ffffff 0%,#e5e5e5 100%);'+
' filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=\'#ffffff\',endColorstr=\'#e5e5e5\',GradientType=0); overflow:auto;';
DivHtToJs.id='DivHtToJs';
DivHtToJs.innerHTML='نام طراح اسکریپت را وارد کنید : <br><input class="input" id="copy"><br>کد جاوا اسکریپت را وارد کنید:<br><center><textarea id="sen" class="textarea" style="width: 99%;height: 160.5px;text-align: left;"><\/textarea><\/center><br><div style="float:left;"><button onclick="edInsertContent(document.getElementById(\'sen\').value,document.getElementById(\'copy\').value);">تایید<\/button><\/div>';
DivHtToJsBg.id='DivHtToJsBg';
DivHtToJsBg.style.cssText='display:block; background:rgba(0,0,0,.6); width:100%; height:100%; position:fixed; top:0; left:0; z-index:5000;';
DivHtToJsBg.onclick=function(){
this.parentNode.removeChild(this);
var DivHtToJs=document.getElementById('DivHtToJs'),
DivHtToJsBg=document.getElementById('DivHtToJsBg');
DivHtToJs.parentNode.removeChild(DivHtToJs);
DivHtToJsBg.parentNode.removeChild(DivHtToJsBg)};
DivHtToJsBody.appendChild(DivHtToJsBg);
DivHtToJsBody.appendChild(DivHtToJs);
}
function edInsertContent(myValue2,dis){
document.getElementById('inhead').value = '<scr'+'ipt>\n'+myValue2+'\n'+dis+'\n<\/scr'+'ipt>';
var DivHtToJs=document.getElementById('DivHtToJs'),
DivHtToJsBg=document.getElementById('DivHtToJsBg');
DivHtToJs.parentNode.removeChild(DivHtToJs);
DivHtToJsBg.parentNode.removeChild(DivHtToJsBg);
}
</script>
<button onclick="edInsertCscript()">نمایش</button><br>
<textarea id="inhead"></textarea>