<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta http-equiv="Content-Script-Type" content="text/jscript"> <script language="JScript" type="text/jscript"> <!-- (function(){ // MenuExtサンプルファイル (xxxx/xx/xx) var page,pdoc,pevt,pelm,purl,eurl,xurl,text,imgs,urls; var tobj,iobj,open,move,info,conf,qtxt,clip,curl,http; page = external.menuArguments; pdoc = page.document; pevt = page.event; pelm = pdoc.elementFromPoint(pevt.clientX,pevt.clientY); purl = page.location.href.toString(); eurl = pelm.getAttribute('href',2) || ''; xurl = pelm.parentNode.getAttribute('href',2) || ''; text = pdoc.selection.createRange().text; imgs = pdoc.images; urls = pdoc.links; tobj = function(text){ return(pdoc.getElementsByTagName(text)); }; iobj = function(text){ return(pdoc.getElementById(text)); }; open = function(murl){ page.window.open(murl); }; move = function(murl){ page.location.replace(murl); }; info = function(text){ page.window.alert(text); }; conf = function(text){ return(page.window.confirm(text)); }; qtxt = function(text){ return(page.window.prompt(text,'')); }; clip = function(text){ clipboardData.setData('Text',text); }; curl = function(murl){ (conf(murl + ' open?')) ? open(murl) : clip(murl); }; http = function(meth,murl){ var ho = new ActiveXObject('WinHttp.WinHttpRequest.5.1'); ho.Option(6) = false; ho.open(meth,murl,false); ho.send(null); return(ho); }; // ここに実行内容を記述 })(); //--> </script>