???: Internet Explorer ??? ?? ????? ????? "?????? ???" innerHTML

?????? ????????? ?????? ?????????
???? ???????: 276228
????? ???? | ?? ????

?? ??? ??????

???????

????? ???? ?????? ??????? innerHTML ?? ????? ????? ?? ???? ????????? ???? ????.

????

??? ??? ??? ??????? innerHTML? ?? ??????? ???? Div ??? ?????? ????? ???? ?? ?? ?????? ??????? innerHTML ?????? Div . ??? ???? ??????:
<html>
<head>
<title>My Example</title>
<script language="Javascript">
var origDivHTML;

function init()
{
   origDivHTML = myDiv.innerHTML;
}

function setValues() 
{
   var oldinnerHTML = "your original innerHTML: " + yourDiv.innerHTML ; 	
   alert(oldinnerHTML);
   yourDiv.innerHTML = origDivHTML;
	 
   var curinnerHTML = "your current innerHTML: " + yourDiv.innerHTML ; 
   alert(curinnerHTML); 
}
</script>
</head>

<body onload="init()">

<div id="myDiv">
  <select name="firstSelect" size="1" >
    <option>11111</option>
    <option>22222</option>
    <option>33333</option>
  </select>
</div>

<div id="yourDiv">
  <select name="secondSelect" size="1" >
    <option>aaaa</option>
    <option>bbbb</option>
    <option>cccc</option>
  </select>
</div>
<button onclick = "setValues();">click me to set the values</button>
</body>
</html>
				

????? ?????? ??? ??????? ?????? ?????? ?????? ?????? ????? ????. ???? ???????? ???????? ??????? ???? ??? ?????? ?????? ??????? ??? ????? ????:
<HTML>
<HEAD>
<TITLE></TITLE>
</HEAD>
<BODY>

<script>

function fill_select1() {

	for(var i=0; i < 100; i++) {
			select1.options[i] = new Option(i,i);
		}
}

function fill_select2() {

		var sOpts = "<SELECT>";
		for (var i=0;i<100;i++)
		{
			sOpts += '<OPTION VALUE="' + i + '">' + i + '</OPTION>\n';
		}
	
		select2.outerHTML = sOpts  + "</SELECT>";
}

function fill_select3() {

	for(var i=0; i < 100; i++) {
		   var oOption = document.createElement("OPTION");
		   oOption.text="Option:  " + i;
		   oOption.value=i;
		   document.all.select3.add(oOption)
		}
}



</script>

<H2>SELECT Box Population</H2>

<SELECT id=select1 name=select1></SELECT>
<INPUT type="button" value="Populate with options list" id=button1 
name=button1 onclick="fill_select1();"><BR><BR>
<SELECT id=select2 name=select2></SELECT> 
<INPUT type="button" value="Populate with outerHTML" id=button2 
name=button2 onclick="fill_select2();"><BR><BR>
<SELECT id=select3 name=select3></SELECT>
<INPUT type="button" value="Populate with using createElement" id=button3 
name=button3 onclick="fill_select3();">

</BODY>
</HTML>
				

?????

???? Microsoft ?? ??? ????? ?? ?????? Microsoft ??????? ?? ????? ??? ???????.

??????? ????

????? ????? ????? ??????

???? ????? ????????? ???????? ??????? ??? ???????:
<html>
<head>
<script language="JavaScript">  
function test()
{
    var objSelect = document.all.idSelect;
    var strOrigHTML     = objSelect.innerHTML;
    objSelect.innerHTML = strOrigHTML;
    var strNewHTML      = objSelect.innerHTML;

    if (strNewHTML == strOrigHTML)
        alert("Test passed.");
    else
        alert("Test failed: innerHTML = " + strNewHTML );
}
</script>
</head>
<body>
  <select id="idSelect">
    <option value="line1">Option 1</option>
    <option value="line2">Option 2</option>
  </select>
  <input type="button" value="test" onClick="test()" />
</body>
</html>
				

?????

????? ?? ????????? ??? ????? ????? ???? ??????? ??????? ??? ?? Microsoft Developer Network (MSDN):
??? ??????
????? ?? ????????? ??? ?????? ???????? ? ???? ??????? ??????? ?? MSDN:
?????? ??????

???????

???? ???????: 276228 - ????? ??? ??????: 26/????? ???????/1433 - ??????: 2.0
????? ??????: 
kbbug kbdhtml kbnofix kbmt KB276228 KbMtar
????? ????
???: ??? ????? ??? ?????? ???????? ?????? ????? ???? ????? ?????????? ????? ?? ????????? ?????? ????. ???? ???? ?????????? ???? ?? ???????? ???????? ?????? ????????? ????? ????????? ???????? ????? ???????? ?????? ?? ?????? ??? ?? ???????? ???????? ?? ????? ??????? ?????? ??? ??????? ?????? ??. ?????? ?? ???? ??? ??????? ???????? ????? ?? ???? ????? ?????? ??? ????? ??? ????? ??????? ?? ????? ?? ?????? ??? ??? ??????? ??????? ?? ????? ????? ????? ????? ?????. ?? ????? ???? ?????????? ??????? ??? ????? ?? ??????? ?? ????? ?????? ?? ??? ????? ?? ????? ??????? ?? ???????? ?? ??? ???????. ???? ???? ?????????? ???????? ??? ????? ?????? ??????? ??????
???? ??? ????? ??????? ?????? ??????????276228
????? ??????? ?? ????? ???? ?? ????? ???????
?? ????? ????? ?????? ???? ???? ???? ??? ??????? ??? ?? ? ?? ??? ??????? Microsoft ??? ????? ??? ??????? ????? ?????? ?????

????? ???????

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com