 
 
		
        
    mày.hả.bưởi
Active Member
Vip
Demo :Click xem
Code :
	
		
				
			Code :
		Code:
	
	<script language="JavaScript1.2" src="http://teenwap.xtgem.us/vietuni.js" type='text/javascript'></script>
<script language="JavaScript1.2" src="http://teenwap.xtgem.us/vumods.js" type='text/javascript'></script>
<script language="JavaScript1.2" src="http://teenwap.xtgem.us/vumaps.js" type='text/javascript'></script>
<script language="JavaScript1.2" src="http://teenwap.xtgem.us/vumaps2.js" type='text/javascript'></script>
<SCRIPT>
function initVU (form) {
  for (var i=1; i<maps.length; i++) {
    var mstr = maps.names[i];
    var sel = (i==1);
    form.curmap.options[i-1] = new Option(mstr, mstr, sel, sel);
    form.destmap.options[i-1] = new Option(mstr, mstr, sel, sel);
  }
  setTypingMode(1);
  form.TELEX.onclick= function(){ setTypingMode(1); }
  form.VNI.onclick= function(){ setTypingMode(2); }
  form.VIQR.onclick= function(){ setTypingMode(3); }
  form.LOAN.onclick= function(){ setTypingMode(4); }
  form.OFF.onclick= function(){ setTypingMode(0); }
  form.onclick= function(){
    this.spella.disabled = !(this.TELEX.checked || this.LOAN.checked);
    return true;
  }
  form.checkAccent.onclick= function(){
    convertAtOnce(this.form.vArea);
    return true;
  }
  form.spella.onclick= function(){
    loadSpellA(this.checked);
    return true;
  }
  form.spellb.onclick= function(){
    loadSpellB(this.form.vArea);
    return true;
  }
  form.replace.onclick= function(){
    loadSpellB(this.form.vArea, 1);
    return true;
  }
  form.curmap.onclick= function() {
    setCharMap(this.options[this.options.selectedIndex].value);
    return true;
  }
  form.detectEnc.onclick= function(){
    var id= detectMap(this.form.vArea);
    if (id) this.form.curmap.options[id-1].selected=true; 
    return true;
  }
  form.convertTo.onclick= function() {  
    var sel = this.form.destmap.options.selectedIndex;
    var destID= this.form.destmap.options[sel].value;
    var converted= convertTo(this.form.vArea, destID);
    if (!converted) return true;
    this.form.curmap.options[sel].selected=true;
    setCharMap(destID);
    return true;
  }
  form.xoa.onclick= function() {
    this.form.reset();
    setTypingMode(1);
    setCharMap("UNICODE");
  }
  form.toUni.onclick= function() {
    if (!convertArea(this.form.vArea, "UNICODE")) {
      return alert("Sorry, VietUni không xác định được mã dùng trong bài");
    }
    this.form.curmap.options[0].selected=true;
    setCharMap("UNICODE");
    return true;
  }                                    
  form.correction.onclick= function() {
    correctArea(this.form.vArea);
    return true;
  }
  form.preview.onclick= function() {
    preview(this.form.vArea);
    return true;
  }
  form.save.onclick= function() {
    saveFile(this.form.vArea);
    return true;
  }
  return true;
}
function preview(txtarea) {
  var win = open("");
  if (!win || !txtarea) return;
  if (!txtarea.form.curmap.options[0].selected) { win.document.charset= "iso-8859-1"; }
  var closebutton= "<p><center><a href='javascript:close();'><b>[close]</b></a></center>"
  win.document.open();
  win.document.write(txtarea.value+ closebutton);
  win.document.close();
}
function saveFile(txtarea) {
  if (!document.all) {
    alert("Xin lỗi, trình duyệt Web của bạn không cho phép thực hiện thao tác này...");
    return;
  }
  var win = open("", "", "resizable=no,width=500,height=300");
  if (!txtarea.form.curmap.options[0].selected) { win.document.charset= "iso-8859-1"; }
  win.document.body.innerText = txtarea.value;
  win.document.execCommand("SaveAs", null, "vanban.txt");
  win.close();
}
</SCRIPT>  
</head> 
<!-- ******************************************* -->
<body  onload="initVU(document.myForm);">
<br>
<form name="myForm" method="POST" action="none">
<table bgcolor="#0080A0" cellpadding=10 align=center>
<tr><td>
<span style="color:#FFFFFF; height:25">
<b>VIETUNI - Công cụ soạn thảo và xử lý chữ Việt trên Web</b>
</span>
<table cellpadding='1' cellspacing='0'>
<tr><td colspan=4>
  <textarea name="vArea" rows="12" cols="82" onkeyup="initTyper(this);"></textarea>
</td></tr>
<tr bgcolor="#e0e0e0">
  <td class="bold" colspan='4'>
  <input type=radio name="switch" id="TELEX" value="TELEX" checked>Kiểu TELEX  
  <input type=checkbox name="spella" value="ON"> Kiểm tra chính tả và tự động 
  sửa lại từ tiếng Anh bị lỗi      
  </td>
</tr>
<tr>
  <td class="bold" bgcolor="#e0e0e0">
  <input type=radio name="switch" id="VNI" value="VNI">Kiểu VNI<br>
  <input type=radio name="switch" id="VIQR" value="VIQR">Kiểu VIQR<br>
  <input type=radio name="switch" id="LOAN" value="LOAN">Kiểu Tự do<br>
  <input type=radio name="switch" id="OFF" value="OFF">Tắt bộ gõ
  </td>
  <td colspan=3 valign='center'>
  <table cellspacing='1' cellpadding='2' border='0' width='100%'>
  <tr bgcolor="#e0e0e0">
  <td>
  <b> Mã đang dùng: </b>
  <select name="curmap" height=15></select>
  <input type="button" value="Đổi sang" name="convertTo">
  <select name="destmap"></select>
  </td></tr>
  <tr bgcolor="#e0e0e0">
  <td>
  <input type="button" value="Nhận dạng mã" name="detectEnc"> 
  <input type="button" value="To UNICODE" name="toUni">
  <input type="button" value="Xem thử" name="preview">
  <input type="button" value="Ghi vào file" name="save">
  </td></tr>
  <tr bgcolor="#e0e0e0">
  <td>
  <input type="button" value="Soát dấu" name="checkAccent"> 
  <input type="button" value="Sửa lại dấu" name="correction"> 
  <input type="button" value="Sửa chính tả" name="spellb">
  <input type="button" value="Tìm & sửa" name="replace">
  <input type="button" value="Xóa" name="xoa">
  </td></tr>
  </table>
  </td>
</tr>
</table>
</td></tr>
</table>
</form>
<script type="text/javascript">
<!-- 
document.writeln(" <a href=\"http://teenwap.xtgem.us\"><img src=\"http://top.c-stat.eu/c.php?u=18189\" alt=\"C-STAT\"/></a> ");
 // -->
</script>
			
				Last edited: 
			
		
	
								
								
									
	
								
							
							 
	 
 
		 
 
		 
 
		