JavaScript execCommandコマンドセット


もっと読む


     

         JavaScript--execCommand   

         

<!--

 

/*

* function  copy  

*/

function fn_doufucopy(){

edit.select();

document.execCommand('Copy');

}

/*

* function  paste  

*/

function fn_doufupaste() { 

tt.focus();

document.execCommand('paste');

} 

/*

* function         

*/

function fn_creatlink()

{

  document.execCommand('CreateLink',true,'true');//         URL

  //document.execCommand('CreateLink',false,'http://www.51js.com');

}

/*

* function                

*/

function fn_change_backcolor()

{

  document.execCommand('BackColor',true,'#FFbbDD');//true false   

}

/*

* function                ,           ,    ,      

*/

function fn_change_forecolor()

{

//     

document.execCommand('ForeColor',false,'#BBDDCC');//true false   

//     

document.execCommand('FontSize',false,7);   //true false   

//            

document.execCommand('FontName',false,'   ');   //true false   

//    

document.execCommand('Bold');

//   

document.execCommand('Italic');

}

/*

* function               

*/

function fn_change_selection()

{

//          

document.execCommand('Underline');

//          

document.execCommand('StrikeThrough');

//          

document.execCommand('SuperScript');

//            

document.execCommand('Underline'); 

}

/*

  * function               

  */

function fn_format()

{

//     

document.execCommand('InsertOrderedList');

//       

document.execCommand('InsertUnorderedList');

//       

document.execCommand('Indent');

}

/*

* function               

*/

function fn_CutOrDel()

{

//       

//document.execCommand('Delete');

//       

document.execCommand('Cut');

}

/*

* function                  

*/

function fn_InsObj()

{

/*

  ******************************************

  *                 object;

  *        ,     true false    ;

  *        object id;

  *     javascript       id    

  ******************************************

*/

/*     button(InsertButton InsertInputButtong  ,

     button,   input)*/

/*document.execCommand('InsertButton',false,"aa"); //true false  

document.all.aa.value="    ";*/

//     fieldset

/*document.execCommand('InsertFieldSet',true,"aa");

document.all.aa.innerText="    ";*/

//       

//document.execCommand('InsertHorizontalRule',true,"aa");

//    iframe

//document.execCommand('InsertIFrame',true,"aa");

//    InsertImage,  true     ,false     

//document.execCommand('InsertImage',false,"aa");

//    checkbox

//document.execCommand('InsertInputCheckbox',true,"aa");

//    file   object

//document.execCommand('InsertInputFileUpload',false,"aa");

//    hidden

/*document.execCommand('InsertInputHidden',false,"aa");

alert(document.all.aa.id);*/

//    InputImage

/*document.execCommand('InsertInputImage',false,"aa");

document.all.aa.src="F-a10.gif";*/

//    Password

//document.execCommand('InsertInputPassword',true,"aa");

//    Radio

//document.execCommand('InsertInputRadio',false,"aa");

//    Reset

//document.execCommand('InsertInputReset',true,"aa");

//    Submit

//document.execCommand('InsertInputSubmit',false,"aa");

//    input text

//document.execCommand('InsertInputText',false,"aa");

//    textarea

//document.execCommand('InsertTextArea',true,"aa");

//     select list box

//document.execCommand('InsertSelectListbox',false,"aa");

//    single select

document.execCommand('InsertSelectDropdown',true,"aa");

//    line break(   ??)

//document.execCommand('InsertParagraph');

//    marquee

/*document.execCommand('InsertMarquee',true,"aa");

document.all.aa.innerText="bbbbb";*/

//           

//document.execCommand('Unselect');

//          

//document.execCommand('SelectAll');

}

/*

* function            

*/

function fn_save()

{

//             

document.execCommand('SaveAs','mycodes.txt');

//      

//document.execCommand('print');

}

-->