select特殊的表单对象,select中没有标签节点,只有文本节点,不能进行inner/outerHTML操作。有专门的构造对象
解决方案 »
- JQuery如何改变浏览器大小
- 我用jquery里的animate方法写个移动,在移动超出div的时候使超出隐藏起来要怎么写
- 使用 removeChild 删除对象A,一定由对象A的父亲来执行吗?
- 正则表达式查找字符串的问题
- 利用单选按钮控制层的出现
- 鼠标指向更换flash,怎么做啊?大家帮忙啊
- <<<<<<网站外包,价格大约在800元左右,5张静态页面,2周内交货
- 用选项卡 切换掉隐藏的百度地图 百度地图不显示
- 高手,请看一下这段代码的意思!!
- 照抄书里的代码但函数无法执行、求分析( Uncaught ReferenceError: xxx is not defined)
- [高难求解]将这段VBS函数翻译成JS
- 写聊天室javascript的小问题
装一个MSDN后,所有的帮助都基本上可以找的到了,哈哈
Contents Index Topic Contents
Previous Topic: opener
Next Topic: outerText
outerHTML--------------------------------------------------------------------------------DescriptionSets or retrieves the current element and its content in HTML. Syntax
object.outerHTML[ = outerHTML]
SettingsThis read-write property can be any valid string containing a combination of text and HTML tags, except for <html>, <head>, and <title> tags. When setting this property, the given string completely replaces the element, including its start and end tags. If the string contains HTML tags, the string is parsed and formatted as it is placed into the document. Note You cannot set this property while the document is loading. Wait for the onload event before attempting to set it. If a tag is dynamically created using TextRange, innerHTML, or outerHTML, you can only use JScript to create new events to handle the newly formed tags. VBScript is not supported.Applies ToA, ACRONYM, ADDRESS, APPLET, AREA, B, BGSOUND, BIG, BLOCKQUOTE, BR, BUTTON, CENTER, CITE, CODE, COMMENT, DD, DEL, DFN, DIR, DIV, DL, DT, EM, EMBED, FIELDSET, FONT, FORM, H1, H2, H3, H4, H5, H6, HR, I, IFRAME, IMG, INPUT, INS, KBD, LABEL, LEGEND, LI, LISTING, MAP, MARQUEE, MENU, OBJECT, OL, P, PLAINTEXT, PRE, Q, S, SAMP, SELECT, SMALL, SPAN, STRIKE, STRONG, SUB, SUP, TABLE, TEXTAREA, TT, U, UL, VAR, XMP See Also
insertAdjacentHTML method
-------------------------------------------------------------------------------- Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.
<form id=form1 name=form1 >
<SELECT id=ss name=ss>
<OPTION value=aaa>a</OPTION>
<OPTION value=bbb>b</OPTION>
</SELECT>
<INPUT type="text" id=selectText name=selectText>
<INPUT type="text" id=selectValue name=selectValue>
</form><SCRIPT LANGUAGE=vbs>
dim s1:s1=""
dim s2:s2=""
With document.form1
for each o in .ss.options
s1= s1 & "," & o.text
s2= s2 & "," & o.value
next
.selectText.value=mid(s1,2)
.selectValue.value=mid(s2,2)
End With
</SCRIPT>我就是江湖上失散多年赫赫有名的vbs教父!