text2.js
上传用户:jhtang88
上传日期:2014-01-27
资源大小:28528k
文件大小:3k
源码类别:

Jsp/Servlet

开发平台:

Java

  1. var sStyleWeight1;
  2. var sStyleWeight2;
  3. var sStyleWeight3;
  4. var sStyleWeight4; 
  5. function loadText()
  6.     {
  7.     var txtLang = document.getElementsByName("txtLang");
  8.     txtLang[0].innerHTML = "Font";
  9.     txtLang[1].innerHTML = "Style";
  10.     txtLang[2].innerHTML = "Size";
  11.     txtLang[3].innerHTML = "Foreground";
  12.     txtLang[4].innerHTML = "Background";
  13.     txtLang[5].innerHTML = "Effects";
  14.     
  15.     txtLang[6].innerHTML = "Decoration";
  16.     txtLang[7].innerHTML = "Text Case";
  17.     txtLang[8].innerHTML = "Minicaps";
  18.     txtLang[9].innerHTML = "Vertical";
  19.     txtLang[10].innerHTML = "Not Set";
  20.     txtLang[11].innerHTML = "Underline";
  21.     txtLang[12].innerHTML = "Overline";
  22.     txtLang[13].innerHTML = "Line-through";
  23.     txtLang[14].innerHTML = "None";
  24.     txtLang[15].innerHTML = "Not Set";
  25.     txtLang[16].innerHTML = "Capitalize";
  26.     txtLang[17].innerHTML = "Uppercase";
  27.     txtLang[18].innerHTML = "Lowercase";
  28.     txtLang[19].innerHTML = "None";
  29.     txtLang[20].innerHTML = "Not Set";
  30.     txtLang[21].innerHTML = "Small-Caps";
  31.     txtLang[22].innerHTML = "Normal";
  32.     txtLang[23].innerHTML = "Not Set";
  33.     txtLang[24].innerHTML = "Superscript";
  34.     txtLang[25].innerHTML = "Subscript";
  35.     txtLang[26].innerHTML = "Relative";
  36.     txtLang[27].innerHTML = "Baseline";
  37.     
  38.     txtLang[28].innerHTML = "Character Spacing";
  39.     txtLang[29].innerHTML = "Preview";
  40.     
  41.     var optLang = document.getElementsByName("optLang");
  42.     optLang[0].text = "Regular"
  43.     optLang[1].text = "Italic"
  44.     optLang[2].text = "Bold"
  45.     optLang[3].text = "Bold Italic"
  46.     optLang[0].value = "Regular"
  47.     optLang[1].value = "Italic"
  48.     optLang[2].value = "Bold"
  49.     optLang[3].value = "Bold Italic"
  50.     
  51.     sStyleWeight1 = "Regular"
  52.     sStyleWeight2 = "Italic"
  53.     sStyleWeight3 = "Bold"
  54.     sStyleWeight4 = "Bold Italic"
  55.     
  56.     optLang[4].text = "Top"
  57.     optLang[5].text = "Middle"
  58.     optLang[6].text = "Bottom"
  59.     optLang[7].text = "Text-Top"
  60.     optLang[8].text = "Text-Bottom"
  61.     
  62.     document.getElementById("btnPick1").value = "Pick";
  63.     document.getElementById("btnPick2").value = "Pick";
  64.     document.getElementById("btnCancel").value = "cancel";
  65.     document.getElementById("btnOk").value = " ok ";
  66.     }
  67. function getText(s)
  68.     {
  69.     switch(s)
  70.         {
  71.         case "Custom Colors": return "Custom Colors";
  72.         case "More Colors...": return "More Colors...";
  73.         default: return "";
  74.         }
  75.     }
  76. function writeTitle()
  77.     {
  78.     document.write("<title>Text Formatting</title>")
  79.     }