bob体育官方平台
慈善写的宽容ie和ff的在线文本编辑器形似ewebeditor

这两天自己的共享目录里面全体exe文件都被病毒感染,上网生龙活虎查才通晓是“logo1_.exe”那几个咚咚搞的鬼。英特网对这么些病毒的风险性评价得非常高,感觉只要中了病毒,整台机器都不能不“Format”了。其缘由大约正是因为具备应用程序都被感染,运维任何程序都回使病毒“重生”。笔者动用“卡巴司机”杀毒,结果提示不能废除,将笔者一切exe文件给删了。苦恼中,自个儿入手写了那个咚咚来扫除已感染程序里的的病毒。 中了“logo1_.exe”病毒请上网找出有关撤废方法,本工具只是消亡被感染文件之中的病毒,因未有太多日子,没做注册表自动还原功能;卡塔尔中毒的场景:会在颇有含有exe文件的目录下创建叁个隐身的“_desktop.ini”文件,里面著录了病毒感染的日期。要是剔除该公文,病毒会重复感染已感染的应用程序并再一次生成“_desktop.ini”文件;超级多被病毒感染的应用程序会冒出很模糊的ICOLogo。 网络故事该病毒每四分钟活动一回啊,还说新装的机械在带毒的互连网事业,两分钟以内就能够被遭毒手,装新系统的对象小心了。 为堤防超级大心的朋友运维病毒文件,笔者风华正茂度将“.exe”后缀去掉了。大家能够加上“.exe”后缀名相比杀毒前和杀毒后的ICOLogo转变景况。 再度提示:未使用本工具灭绝“病毒样品”里的病毒从前,千万别运营“病毒样品”程序。不然立时成功:D 保存为:Logo1_Kill.js运营就能够复制代码 代码如下:TaskKill; TaskKill; varwindow,lstKill,pnlScan,form1=newForm; form1.Run { varIE=WSH.GetObject("","InternetExplorer.Application"State of Qatar; IE.ToolBar=0; IE.StatusBar=0; IE.Width=350; IE.Height=360; IE.Navigate; vardocument=IE.document; document.body.scroll="no"; document.body.style.font="9pt宋体"; window=document.frames; document.body.charset="gb2312"; document.bgColor="menu"; document.body.style.border=0; document.title="图标1_.exe病毒杀绝工具"; this.Run=function(卡塔尔(قطر‎ { varbtnKill=newButton; varfilebox=newFile博克斯; vargrpScan=newGroup; vargrpKill=newGroup; vardir帕特h=newTextBox; varbtnScan=newButton; pnlScan=newPanel; lstKill=newListBox; dirPath.value="D:\"; grpScan.Text.data="目录扫描"; pnlScan.Text.data="筹划妥贴"; lstKill.style.width="100%"; lstKill.style.height="2in"; AddControl; grpKill.Add; grpKill.Add; AddControl; grpScan.Add; grpScan.Add; grpScan.Add; grpScan.Add; btnKill.onclick=btnKill_Clicked; btnScan.onclick=btnScan_Clicked; IE.Visible=true; try { while { if { try { varFSO=newActiveXObject("Scripting.FileSystemObject"); varFolder=FSO.getFolder; FolderList { window.alert; } btnScan.disabled=false; window.alert; } WSH.Sleep {} functionbtnKill_Clicked() { varFilePath=filebox.value; if(FilePath&&Check { if(window.confirm { try { Backup; } catch{} whileClear; window.alert; } } else { window.alert; } } functionbtnScan_Clicked() { while(lstKill.options.length)lstKill.options.remove; btnScan.disabled=true; } } functionAddControl { document.body.appendChild; } functionFileBox() { varobj=document.createElement; obj.type="file"; returnobj; } functionButton { varobj=document.createElement; obj.type="button"; obj.value=text; returnobj; } functionTextBox() { returndocument.createElement; } functionPanel() { varDiv=document.createElement; Div.Add=function { this.appendChild; } Div.Text=document.createTextNode; Div.style.overflow="hidden"; returnDiv; } functionGroup { varfieldset=document.createElement; varlegend=document.createElement; fieldset.Text=document.createTextNode(); fieldset.Text.data=Title; legend.appendChild; fieldset.Add=function { this.appendChild; } fieldset.Add; fieldset.style.marginBottom="2mm"; returnfieldset; } functionListBox() { varselect=document.createElement; select.multiple=true; select.Add=function { varopt=window.Option; select.options.add; } returnselect; } } functionTaskKill { varWinMgmts=GetObject("WinMgmts://127.0.0.1"); varProcList=WinMgmts.ExecQuery("select*fromwin32_process"); varProcList=newEnumerator; while { if.Name.toLowerCase()==Process.toLowerCase.terminate(); ProcList.moveNext(); } } functionCheck { varCode="MZKERNEL32.DLLx00x00LoadLibraryAx00x00x00x00GetProcAddressx00x00|x00x00BKwdwing@"; varStream=newActiveXObject; Stream.Open(); Stream.Charset="gb2312"; Stream.LoadFromFile; varBody=Stream.ReadText; Body=Body.replace(/[sS]x00x00BK/,"|x00x00BK"); returnBody==Code; } functionClear { varStream=newActiveXObject; Stream.Open(); Stream.LoadFromFile; varBody=Stream.ReadText; Stream.Close(); varMatch=""; whileMatch+="x00"; Match+="MZ"; varC=0,Temp=""; while(C

Option 对象表示 HTML 表单中下拉列表中的贰个精选。在 HTML 表单中 标签每现身三次,一个 Option 对象就能被创设。您可由此表单的 elements[] 数组访谈一个 Option 对象,也许经过采用 document.getElementById(卡塔尔(قطر‎。

怎么说呢,刚包完夜吧,应该很累了,但以往依然有劲头敲打着那一个字符,看来笔者还尚无到此截至啊。
废话少说,最近写了个在线的编辑器,相近ewebeditor那样的,当然未有住户那么刚劲,可是基本作用皆有,何况照旧包容ie和ff的,为此笔者也花了成都百货上千武术,依然赶紧把代码祭出来啊
demo.html

1.创建Option对象

复制代码 代码如下:

  1.1 var optionEle1 = document.createElement('option');

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" ";
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<script src="core.js"></script>
<script src="advance.js"></script>
<table border="0" width="800" height="500" bgcolor="gray">
<tr height="50"><td>
字体:<select onchange="FontName(this.options[this.selectedIndex].value)">
<option value="宋体">宋体
<option value="黑体">黑体
<option value="楷体_GB2312">楷体
<option value="仿宋_GB2312">仿宋
<option value="隶书">隶书
<option value="幼圆">幼圆
<option value="新宋体">新宋体
<option value="细明体">细明体
<option value="Arial">Arial
<option value="Arial Black">Arial Black
<option value="Arial Narrow">Arial Narrow
<option value="Bradley Hand ITC">Bradley Hand ITC
<option value="Brush Script MT">Brush Script MT
<option value="Century Gothic">Century Gothic
<option value="Comic Sans MS">Comic Sans MS
<option value="Courier">Courier
<option value="Courier New">Courier New
<option value="MS Sans Serif">MS Sans Serif
<option value="Script">Script
<option value="System">System
<option value="Times New Roman">Times New Roman
<option value="Viner Hand ITC">Viner Hand ITC
<option value="Verdana">Verdana
<option value="Wide Latin">Wide Latin
<option value="Wingdings">Wingdings</option>
</select>
字号:<select onchange="FontSize(this.options[this.selectedIndex].value)">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
</select>
<button onclick="color()">颜色</button>
<button onclick="bold()">加粗</button>
<button onclick="italic()">倾斜</button>
<button onclick="left()">居左</button>
<button onclick="center()">居中</button>
<button onclick="right()">居右</button>
</td></tr>
<tr height="50"><td>
<button>插入影视和图纸</button>
<button>上传文件</button>
<button onclick="inserttable(State of Qatar">插入表格</button>
<button onclick="inserthr(卡塔尔国">插入水平线</button>
<button onclick="insertlink(State of Qatar">插入超链接</button>
</td></tr>
<tr height="400">
<td height="400">
<iframe id="content" width="100%" height="100%"></iframe>
</td>
</tr>
</table>
<script src="edit.js"></script>
</body>
</html>

  1.2 var optionEle2 = new Option(text, value, defaultSelected, selected);

core.js

2.options属性

复制代码 代码如下:

  2.1 select.options再次回到select标签上面包车型地铁Option对象的汇集

sx={};
sx.comm={};
sx.comm.string=function(){
if(!String.prototype.left){
String.prototype.left=function(l){
return this.substr(0,l);
}
}
if(!String.prototype.right){
String.prototype.right=function(l){
return this.substr(this.length-l,l);
}
}
if(!String.prototype.trim){
String.prototype.trim=function(){
return this.replace(/^/s+|/s+$/g,"");
}
}
}();
sx.comm.array=function(){
if(!Array.prototype.indexOf){
Array.prototype.indexOf=function(data){
for(var i=0;i<this.length;i++){
if(this[i]==data){
break;
}
}
return i==this.length?-1:i;
}
}
if(!Array.prototype.lastIndexOf){
Array.prototype.lastIndexOf=function(data){
for(var i=this.length-1;i>=0;i--){
if(this[i]==data){
break;
}
}
return i;
}
}
if(!Array.prototype.clone){
Array.prototype.clone=function(){
var temp=[];
for(var i=0;i<this.length;i++){
if(this[i] instanceof Array){
temp[i]=this[i].clone();
}else{
temp[i]=this[i];
}
}
return temp;
}
}
if(!Array.prototype.every){
Array.prototype.every=function(o,f){
for (var i = 0; i < this.length; i++) {
if (this[i] instanceof Array) {
this[i].every(o,f);
}
else {
f.call(o, this[i]);
}
}
}
}
}();
sx.comm.ver=function(){
try{
HTMLElement;
return "ff";
}catch(e){
return "ie";
}
}();
sx.comm.ext=function(){
if(sx.comm.ver=="ff"){
HTMLElement.prototype.__defineGetter__("outerHTML",function(){
var attr;
var attrs=this.attributes;
var str="<"+this.tagName.toLowerCase();
for(var i=0;i<attrs.length;i++){
attr=attrs[i];
if(attr.specified)
str+=" "+attr.name+'="'+attr.value+'"';
}
if(!this.canHaveChildren)
return str+">";
return str+">"+this.innerHTML+"</"+this.tagName.toLowerCase()+">";
});
HTMLElement.prototype.__defineGetter__("canHaveChildren",function(){
switch(this.tagName.toLowerCase()){
case "area":
case "base":
case "basefont":
case "col":
case "frame":
case "hr":
case "img":
case "br":
case "input":
case "isindex":
case "link":
case "meta":
case "param":
return false;
}
return true;
});
XMLDocument.prototype.selectNodes = Element.prototype.selectNodes = function (){
//alert(arguments[0]);
var oNSResolver = this.createNSResolver(this.documentElement)
var aItems = this.evaluate(arguments[0].toLowerCase(), this, oNSResolver,
XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null)
var aResult = [];
for( var i = 0; i < aItems.snapshotLength; i++)
{
aResult[i] = aItems.snapshotItem(i);
}
//alert(aItems.snapshotLength);
return aResult;
}
}
}();
sx.event={};
sx.event.target=function(){
if(window.event){
return window.event.srcElement;
}else{
var f=arguments.callee.caller;
while(f){
if(f.arguments[0] instanceof Event){
return f.arguments[0].target;
}
f=f.caller;
}
}
}
sx.event.event=function(){
if (window.event) {
return window.event;
}else{
var f=arguments.callee.caller;
while (f) {
if (f.arguments[0] instanceof Event) {
return f.arguments[0];
}
f = f.caller;
}
}
}
sx.event.relatedtarget=function(){
if(window.event){
if(window.event.type=="mouseover"){
return window.event.fromElement;
}else if(window.event.type=="mouseout"){
return window.event.toElement;
}
}else{
var f=arguments.callee.caller;
while (f) {
if (f.arguments[0] instanceof Event) {
return f.arguments[0].relatedTarget;
}
f = f.caller;
}
}
}
sx.event.stopevent=function(){
if (window.event) {
window.event.returnValue=false;
window.event.cancelBubble=true;
}else{
var f=arguments.callee.caller;
while(f){
if(f.arguments[0] instanceof Event){
break;
}
f=f.caller;
}
f.arguments[0].preventDefault();
f.arguments[0].stopPropagation();
}
}
sx.event.addevent=function(e,t,f){
if(!arguments.callee.event){
arguments.callee.event=[];
}
if(e.attachEvent){
e.attachEvent("on"+t,f);
}else{
e.addEventListener(t,f,false);
}
arguments.callee.event.push(f);
return arguments.callee.event.length-1;
}
sx.event.removeevent=function(e,t,i){
if(e.detachEvent){
e.detachEvent("on"+t,sx.event.addevent.event[i]);
}else{
e.removeEventListener(t,sx.event.addevent.event[i],false);
}
sx.event.addevent.event[i]=null;
}
sx.event.parseevent=function(e,t){
if (sx.comm.ver=="ie"){
e.fireEvent("on"+t);
}else{
var evt = document.createEvent("Events");
evt.initEvent(t, true, true);
e.dispatchEvent(evt);
}
}
sx.dom={};
sx.dom.text=function(e){
return this.e.innerText?this.e.innerText:this.e.innerHTML.replace(//<.*?/>/igm,"");
}
sx.dom.elementnodes=function(e,flag){
var temp=[];
var a=e.childNodes;
for(var i=0;i<a.length;i++){
if(a[i].nodeType==flag){
temp.push(a[i]);
}
}
return temp;
}
sx.dom.elementallnodes=function(e,flag){
var temp=[];
var a=e.getElementsByTagName("*");
for(var i=0;i<a.length;i++){
if(a[i].nodeType==flag){
temp.push(a[i]);
}
}
return temp;
}
sx.dom.xpath=function(e,mode){
p=e.cloneNode(true);
var s=p.getElementsByTagName("script");
for(var i=0;i<s.length;i++)
p.replaceChild(s[i].cloneNode(false),s[i]);
var html=p.outerHTML.replace(//=(?!"|')(.*?)(?=/s|>)/ig,"=/"$1/"");
if(window.ActiveXObject){
var x=new ActiveXObject("Msxml2.DOMDocument");
x.async=false;
x.loadXML("<?xml version=/"1.0/" encoding=/"gb2312/" ?>"+html);
}else{
var oParser = new DOMParser();
//alert(html);
var x = oParser.parseFromString(html,"text/xml");
//alert(x.documentElement.tagName);
}
var div=x.selectNodes(mode);
//alert(div.length);
var temp=[];
var a1=x.selectNodes(e.tagName.toUpperCase()+"//*");
//alert(a1.length);
var all=e.getElementsByTagName("*");
//alert(all.length);
var i1=0;
for(i=0;i<a1.length;i++){
//alert(i);
if(a1[i]==div[i1]){
temp.push(all[i]);
i1++;
}
}
x=null;
return temp;
}
sx.dom.left=function(e){
if(document.getBoundingClientRect){
return e.getBoundingClientRect().left;
}else{
var a=e;
var left=0;
while(a){
left+=a.offsetLeft;
a=a.offsetParent;
}
return left;
}
}
sx.dom.top = function(e){
if(document.getBoundingClientRect){
return e.getBoundingClientRect().top;
}else{
var a=e;
var top=0;
while(a){
top+=a.offsetTop;
a=a.offsetParent;
}
return top;
}
}
sx.dom.getstyle=function(e,prop){
if(e.currentStyle){
return e.currentStyle[prop];
}else{
return document.defaultView.getComputedStyle(e,null).getPropertyValue(prop);
}
}
sx.dom.setstyle=function(e,data){
for(var i in data){
e.style[i]=data[i];
}
}
advance.js:
var $=function(id){
return document.getElementById(id);
}

3.清空下拉菜单

edit.js

  3.1 利用for循环删除,注意数首席实行官度的动态变化

复制代码 代码如下:

  3.2 select.options.length = 0;

var w=$("content").contentWindow;
w.document.designMode="on";
w.document.open();
w.document.write("<html><body bgcolor='white'></body></body>")
w.document.close();
if(sx.comm.ver=="ie"){
//w.document.body.style.lineHeight="10px";
}
w.document.onkeydown=function(){
if(sx.comm.ver=="ie"){
if(w.event.keyCode==13){
var s=w.document.selection.createRange();
s.pasteHTML("<br/>");
w.focus();
return false;
}
}
}
function wnd(){
var main=document.createElement("div");
sx.dom.setstyle(main,{
position:"absolute",
width:"100%",
height:"100%",
backgroundColor:"lightblue",
filter:"alpha(opacity=50)",
opacity:0.5
});
var body=document.createElement("div");
sx.dom.setstyle(body,{
position:"absolute",
width:"200px",
height:"250px",
backgroundColor:"green",
zIndex:1000
});
var title=document.createElement("div");
sx.dom.setstyle(title,{
width:"200px",
height:"20px",
backgroundColor:"blue",
});
var close=document.createElement("span");
sx.dom.setstyle(close,{
marginLeft:"180px",
display:"block",
width:"20px",
height:"20px",
textAlign:"center",
cursor:"pointer"
});
close.innerHTML="X";
close.onclick=function(){
main.parentNode.removeChild(main);
body.parentNode.removeChild(body);
}
title.appendChild(close);
body.appendChild(title);
var content=document.createElement("div");
sx.dom.setstyle(content,{
width:"200px",
height:"230px"
});
body.appendChild(content);
this.show=function(e){
document.body.appendChild(main);
sx.dom.setstyle(main,{
top:"0px",
left:"0px"
});
document.body.appendChild(body);
sx.dom.setstyle(body,{
top:sx.dom.top(e)+e.clientHeight+"px",
left:sx.dom.left(e)+e.clientWidth+"px",
});
}
this.close=close;
this.main=main;
this.body=body;
this.title=title;
this.content=content;
}
function bold(){
w.document.execCommand("bold",null,null);
}
function italic(){
w.document.execCommand("italic",null,null);
}
function left(){
w.document.execCommand("JustifyLeft",null,null);
}
function center(){
w.document.execCommand("Justifycenter",null,null);
}
function right(){
w.document.execCommand("Justifyright",null,null);
}
function FontName(value){
w.document.execCommand("FontName", false, value);
}
function FontSize(value){
w.document.execCommand("FontSize", false, value);
}
function inserthr(){
if(document.selection){
w.focus();
var s=w.document.selection.createRange();
s.pasteHTML("<hr/>");
}else{
w.focus();
var s=w.getSelection().getRangeAt(0);
s.insertNode(w.document.createElement("hr"));
}
}
function insertlink(){
if (document.selection) {
w.focus();
var s = w.document.selection.createRange();
}
else {
w.focus();
var s = w.getSelection().getRangeAt(0);
}
var e=sx.event.target();
var ww=new wnd();
ww.content.appendChild(document.createTextNode("请输入链接地址;"卡塔尔(قطر‎State of Qatar;
var link=document.createElement("input");
link.type="text";
link.size=20;
ww.content.appendChild(link);
var b=document.createElement("button");
b.innerHTML="确定";
ww.content.appendChild(b);
b.onclick=function(){
if(sx.comm.ver=="ie"){
s.pasteHTML("<a href='"+link.value+"'>"+s.htmlText+"</a>");
}
else{
var a=w.document.createElement("a");
a.href=link.value;
s.surroundContents(a);
}
sx.event.parseevent(ww.close,"click");
}
ww.show(e);
}
function inserttable(){
if (document.selection) {
w.focus();
var s = w.document.selection.createRange();
}
else {
w.focus();
var s = w.getSelection().getRangeAt(0);
}
var e=sx.event.target();
var ww=new wnd();
ww.content.appendChild(document.createTextNode("请输入行数;"卡塔尔国卡塔尔;
var tr=document.createElement("input");
tr.type="text";
tr.size=20;
ww.content.appendChild(tr);
ww.content.appendChild(document.createElement("br"));
ww.content.appendChild(document.createTextNode("请输入列数;"卡塔尔(قطر‎卡塔尔国;
var td=document.createElement("input");
td.type="text";
td.size=20;
ww.content.appendChild(td);
ww.content.appendChild(document.createElement("br"));
ww.content.appendChild(document.createTextNode("请输入单元格高度;"卡塔尔(قطر‎State of Qatar;
var height=document.createElement("input");
height.type="text";
height.size=20;
ww.content.appendChild(height);
ww.content.appendChild(document.createElement("br"));
ww.content.appendChild(document.createTextNode("请输入单元格宽度;"卡塔尔国卡塔尔(قطر‎;
var width=document.createElement("input");
width.type="text";
width.size=20;
ww.content.appendChild(width);
ww.content.appendChild(document.createElement("br"));
var b=document.createElement("button");
b.innerHTML="确定";
ww.content.appendChild(b);
b.onclick=function(){
var l1=Number(tr.value);
var l2=Number(td.value);
var h1=Number(height.value);
var w1=Number(width.value);
ww.content.appendChild(document.createTextNode("请输入单元格中度;"卡塔尔国State of Qatar;
var t=document.createElement("table");
t.border="1";
var tb=document.createElement("tbody");
t.appendChild(tb);
for(var i=0;i<l1;i++){
var tr1=document.createElement("tr");
for(var i1=0;i1<l2;i1++){
var td1=document.createElement("td");
td1.innerHTML="";
sx.dom.setstyle(td1,{
width:w1+"px",
height:h1+"px"
});
tr1.appendChild(td1);
}
tb.appendChild(tr1);
}
if(sx.comm.ver=="ie"){
s.pasteHTML(t.outerHTML);
}
else{
s.insertNode(t);
s.insertNode(document.createElement("br"));
}
sx.event.parseevent(ww.close,"click");
}
ww.show(e);
}
function color(){
var e=sx.event.target();
if (document.selection) {
w.focus();
var s = w.document.selection.createRange();
}
else {
w.focus();
var s = w.getSelection().getRangeAt(0);
}
var ww=new wnd();
var colors = ["00","33","66","99","CC","FF"];
var cp=document.createElement("span");
sx.dom.setstyle(cp,{
display:"inline-block",
width:"10px",
height:"10px",
margin:"2px"
});
for(var i1=5;i1>=0;i1--){
for(var i2=5;i2>=0;i2--){
for(var i3=5;i3>=0;i3--){
var cp1=cp.cloneNode(true);
cp1.style.backgroundColor="#" + colors[i1] + colors[i2] + colors[i3];
cp1.title="#" + colors[i1] + colors[i2] + colors[i3];
cp1.onclick=function(){
if(sx.comm.ver=="ie"){
w.focus();
s.pasteHTML("<font color='"+this.title+"'>"+s.htmlText+"</font>");
}
else{
var a=w.document.createElement("font");
a.color=this.title;
s.surroundContents(a);
}
sx.event.parseevent(ww.close,"click");
}
ww.content.appendChild(cp1);
}
}
}
ww.show(e);
}

4.应用

重要是demo.html和edit.js里的代码,core.js和advance.js里的代码是自己为协作浏览器写的,本想把它增添成三个到家的框架的,因为日子少于,就没写下去了。

functionnumber(){

本编辑器还从未兑现图片和文书的上传,因为要求服务器才能,所以笔者就没写了,能够交给读者慢慢研商。
自家策动先将web放放了,最早静心于vc++的斟酌上,尽量能写出八个相通的顺序出来,今后假设不时间自身也会一而再再而三完备那几个编辑器以至javascript包容的框架。
恩,好好加油啊。

varobj = document.getElementById("mySelect");

废话少说,前段时间写了个在线的编辑器,...

//obj.options[obj.selectedIndex] = new Option("小编的吃吃","4"卡塔尔(قطر‎;//在现阶段相中的非常的值中改换

//obj.options.add(new Option("笔者的吃吃","4"State of Qatar卡塔尔(قطر‎;再增加二个option

//alert(obj.selectedIndex卡塔尔国;//展现序号,option自个儿设置的

//obj.options[obj.selectedIndex].text = "作者的吃吃";改善值

//obj.remove(obj.selectedIndex卡塔尔(قطر‎;删除作用

}

1.动态成立select

functioncreateSelect(){

    varmySelect = document.createElement("select"); 

mySelect.id = "mySelect"; 

document.body.appendChild(mySelect);

}

2.增加选项option

functionaddOption(){

     //依据id查找对象,

varobj=document.getElementById('mySelect');

      //加多二个采撷

obj.add(newOption("文本","值"卡塔尔State of Qatar;  //这些只可以在IE中有效

obj.options.add(newOption("text","value"卡塔尔国卡塔尔(قطر‎; //这几个兼容IE与firefox

}

3.去除全数选项option

functionremoveAll(){

varobj=document.getElementById('mySelect');

obj.options.length=0;  

 }

4.剔除贰个筛选option

functionremoveOne(){

varobj=document.getElementById('mySelect');

返回顶部