Dialog_InsertAnchor.js
上传用户:simon2hong
上传日期:2021-11-18
资源大小:16746k
文件大小:2k
- var OxO1d6a=["nodeName","INPUT","TEXTAREA","BUTTON","IMG","SELECT","TABLE","position","style","absolute","relative","|H1|H2|H3|H4|H5|H6|P|PRE|LI|TD|DIV|BLOCKQUOTE|DT|DD|TABLE|HR|IMG|","|","body","document","allanchors","anchor_name","editor","window","name","value","[[ValidName]]","options","length","anchors","OPTION","text"]; function Element_IsBlockControl(element){var name=element[OxO1d6a[0x0]];if(name==OxO1d6a[0x1]){return true;} ;if(name==OxO1d6a[0x2]){return true;} ;if(name==OxO1d6a[0x3]){return true;} ;if(name==OxO1d6a[0x4]){return true;} ;if(name==OxO1d6a[0x5]){return true;} ;if(name==OxO1d6a[0x6]){return true;} ;var Ox182=element[OxO1d6a[0x8]][OxO1d6a[0x7]];if(Ox182==OxO1d6a[0x9]||Ox182==OxO1d6a[0xa]){return true;} ;return false;} ; function Element_CUtil_IsBlock(Ox261){var Ox262=OxO1d6a[0xb];return (Ox261!=null)&&(Ox262.indexOf(OxO1d6a[0xc]+Ox261[OxO1d6a[0x0]]+OxO1d6a[0xc])!=-0x1);} ; function Window_SelectElement(Ox1bd,element){if(Element_IsBlockControl(element)){var coll=Ox1bd[OxO1d6a[0xe]][OxO1d6a[0xd]].createControlRange(); coll.add(element) ; coll.select() ;} else {var range=Ox1bd[OxO1d6a[0xe]][OxO1d6a[0xd]].createTextRange(); range.moveToElementText(element) ; range.select() ;} ;} ;var allanchors=Window_GetElement(window,OxO1d6a[0xf],true);var anchor_name=Window_GetElement(window,OxO1d6a[0x10],true);var obj=Window_GetDialogArguments(window);var editor=obj[OxO1d6a[0x11]];var editwin=obj[OxO1d6a[0x12]];var editdoc=obj[OxO1d6a[0xe]];var name=obj[OxO1d6a[0x13]]; function insert_link(){var Ox267=anchor_name[OxO1d6a[0x14]];var Ox268=/[^a-zd]/i;if(Ox268.test(Ox267)){ alert(OxO1d6a[0x15]) ;} else { Window_SetDialogReturnValue(window,Ox267) ; Window_CloseDialog(window) ;} ;} ; function updateList(){while(allanchors[OxO1d6a[0x16]][OxO1d6a[0x17]]!=0x0){ allanchors[OxO1d6a[0x16]].remove(allanchors.options(0x0)) ;} ;for(var i=0x0;i<editdoc[OxO1d6a[0x18]][OxO1d6a[0x17]];i++){var Ox26a=document.createElement(OxO1d6a[0x19]); Ox26a[OxO1d6a[0x1a]]=editdoc[OxO1d6a[0x18]][i][OxO1d6a[0x13]] ; Ox26a[OxO1d6a[0x14]]=editdoc[OxO1d6a[0x18]][i][OxO1d6a[0x13]] ; allanchors[OxO1d6a[0x16]].add(Ox26a) ;} ;} ; function selectAnchor(Ox26c){ editor.FocusDocument() ;for(var i=0x0;i<editdoc[OxO1d6a[0x18]][OxO1d6a[0x17]];i++){if(editdoc[OxO1d6a[0x18]][i][OxO1d6a[0x13]]==Ox26c){ anchor_name[OxO1d6a[0x14]]=Ox26c ; Window_SelectElement(editwin,editdoc[OxO1d6a[0x18]][i]) ;} ;} ;} ;if(name){ anchor_name[OxO1d6a[0x14]]=name ;} ; updateList() ;