﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>BlogJava-eBusiness Technik-随笔分类-AJAX</title><link>http://www.blogjava.net/scorpionchinas/category/20203.html</link><description /><language>zh-cn</language><lastBuildDate>Wed, 28 Feb 2007 08:08:56 GMT</lastBuildDate><pubDate>Wed, 28 Feb 2007 08:08:56 GMT</pubDate><ttl>60</ttl><item><title>Ajax开发记录一:  xmlhttp创建的一种方式</title><link>http://www.blogjava.net/scorpionchinas/archive/2007/02/28/101154.html</link><dc:creator>scorpionchinas</dc:creator><author>scorpionchinas</author><pubDate>Wed, 28 Feb 2007 07:40:00 GMT</pubDate><guid>http://www.blogjava.net/scorpionchinas/archive/2007/02/28/101154.html</guid><wfw:comment>http://www.blogjava.net/scorpionchinas/comments/101154.html</wfw:comment><comments>http://www.blogjava.net/scorpionchinas/archive/2007/02/28/101154.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/scorpionchinas/comments/commentRss/101154.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/scorpionchinas/services/trackbacks/101154.html</trackback:ping><description><![CDATA[
		<br />
		<font face="Tahoma">
				<strong>
						<font color="#a52a2a" size="2">编写一个js文件。如functions.js。用来存放要使用到的js函数。文件开头如下：</font>
						<br />
				</strong>            <font color="#000000" size="1">（判断浏览器类型和版本，并创建相应的xmlhttp实例）</font></font>
		<br />
		<div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee">
				<span style="COLOR: #008080"> 1</span>
				<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
				<span style="COLOR: #000000">    </span>
				<span style="COLOR: #008000">//</span>
				<span style="COLOR: #008000">functions.js</span>
				<span style="COLOR: #008000">
						<br />
				</span>
				<span style="COLOR: #008080"> 2</span>
				<span style="COLOR: #008000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
				</span>
				<span style="COLOR: #000000">    <br /></span>
				<span style="COLOR: #008080"> 3</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />    </span>
				<span style="COLOR: #008000">//</span>
				<span style="COLOR: #008000">Create a boolean variable to check for a valid MS instance.</span>
				<span style="COLOR: #008000">
						<br />
				</span>
				<span style="COLOR: #008080"> 4</span>
				<span style="COLOR: #008000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
				</span>
				<span style="COLOR: #000000">    </span>
				<span style="COLOR: #0000ff">var</span>
				<span style="COLOR: #000000"> xmlhttp </span>
				<span style="COLOR: #000000">=</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">false</span>
				<span style="COLOR: #000000">;<br /></span>
				<span style="COLOR: #008080"> 5</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />    <br /></span>
				<span style="COLOR: #008080"> 6</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />    </span>
				<span style="COLOR: #008000">//</span>
				<span style="COLOR: #008000">Check if we are using IE.</span>
				<span style="COLOR: #008000">
						<br />
				</span>
				<span style="COLOR: #008080"> 7</span>
				<span style="COLOR: #008000">
						<img id="Codehighlighter1_139_240_Open_Image" onclick="this.style.display='none'; Codehighlighter1_139_240_Open_Text.style.display='none'; Codehighlighter1_139_240_Closed_Image.style.display='inline'; Codehighlighter1_139_240_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" />
						<img id="Codehighlighter1_139_240_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_139_240_Closed_Text.style.display='none'; Codehighlighter1_139_240_Open_Image.style.display='inline'; Codehighlighter1_139_240_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedBlock.gif" align="top" />
				</span>
				<span style="COLOR: #000000">    </span>
				<span style="COLOR: #0000ff">try</span>
				<span style="COLOR: #000000"> </span>
				<span id="Codehighlighter1_139_240_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
						<img src="http://www.blogjava.net/images/dot.gif" />
				</span>
				<span id="Codehighlighter1_139_240_Open_Text">
						<span style="COLOR: #000000">{<br /></span>
						<span style="COLOR: #008080"> 8</span>
						<span style="COLOR: #000000">
								<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />        </span>
						<span style="COLOR: #008000">//</span>
						<span style="COLOR: #008000">If the javascript version is greater than 5.</span>
						<span style="COLOR: #008000">
								<br />
						</span>
						<span style="COLOR: #008080"> 9</span>
						<span style="COLOR: #008000">
								<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />
						</span>
						<span style="COLOR: #000000">        xmlhttp </span>
						<span style="COLOR: #000000">=</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #0000ff">new</span>
						<span style="COLOR: #000000"> ActiveXObject(</span>
						<span style="COLOR: #000000">"</span>
						<span style="COLOR: #000000">Msxml2.XMLHTTP</span>
						<span style="COLOR: #000000">"</span>
						<span style="COLOR: #000000">);<br /></span>
						<span style="COLOR: #008080">10</span>
						<span style="COLOR: #000000">
								<img id="Codehighlighter1_252_474_Open_Image" onclick="this.style.display='none'; Codehighlighter1_252_474_Open_Text.style.display='none'; Codehighlighter1_252_474_Closed_Image.style.display='inline'; Codehighlighter1_252_474_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" />
								<img id="Codehighlighter1_252_474_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_252_474_Closed_Text.style.display='none'; Codehighlighter1_252_474_Open_Image.style.display='inline'; Codehighlighter1_252_474_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedBlock.gif" align="top" />    }</span>
				</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">catch</span>
				<span style="COLOR: #000000"> (e) </span>
				<span id="Codehighlighter1_252_474_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
						<img src="http://www.blogjava.net/images/dot.gif" />
				</span>
				<span id="Codehighlighter1_252_474_Open_Text">
						<span style="COLOR: #000000">{<br /></span>
						<span style="COLOR: #008080">11</span>
						<span style="COLOR: #000000">
								<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />        </span>
						<span style="COLOR: #008000">//</span>
						<span style="COLOR: #008000">If not, then use the older active x object.</span>
						<span style="COLOR: #008000">
								<br />
						</span>
						<span style="COLOR: #008080">12</span>
						<span style="COLOR: #008000">
								<img id="Codehighlighter1_308_390_Open_Image" onclick="this.style.display='none'; Codehighlighter1_308_390_Open_Text.style.display='none'; Codehighlighter1_308_390_Closed_Image.style.display='inline'; Codehighlighter1_308_390_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" />
								<img id="Codehighlighter1_308_390_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_308_390_Closed_Text.style.display='none'; Codehighlighter1_308_390_Open_Image.style.display='inline'; Codehighlighter1_308_390_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />
						</span>
						<span style="COLOR: #000000">        </span>
						<span style="COLOR: #0000ff">try</span>
						<span style="COLOR: #000000"> </span>
						<span id="Codehighlighter1_308_390_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
								<img src="http://www.blogjava.net/images/dot.gif" />
						</span>
						<span id="Codehighlighter1_308_390_Open_Text">
								<span style="COLOR: #000000">{<br /></span>
								<span style="COLOR: #008080">13</span>
								<span style="COLOR: #000000">
										<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />            </span>
								<span style="COLOR: #008000">//</span>
								<span style="COLOR: #008000">If we are using IE.</span>
								<span style="COLOR: #008000">
										<br />
								</span>
								<span style="COLOR: #008080">14</span>
								<span style="COLOR: #008000">
										<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />
								</span>
								<span style="COLOR: #000000">            xmlhttp </span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #0000ff">new</span>
								<span style="COLOR: #000000"> ActiveXObject(</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">Microsoft.XMLHTTP</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">);<br /></span>
								<span style="COLOR: #008080">15</span>
								<span style="COLOR: #000000">
										<img id="Codehighlighter1_402_471_Open_Image" onclick="this.style.display='none'; Codehighlighter1_402_471_Open_Text.style.display='none'; Codehighlighter1_402_471_Closed_Image.style.display='inline'; Codehighlighter1_402_471_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" />
										<img id="Codehighlighter1_402_471_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_402_471_Closed_Text.style.display='none'; Codehighlighter1_402_471_Open_Image.style.display='inline'; Codehighlighter1_402_471_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />        }</span>
						</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #0000ff">catch</span>
						<span style="COLOR: #000000"> (E) </span>
						<span id="Codehighlighter1_402_471_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
								<img src="http://www.blogjava.net/images/dot.gif" />
						</span>
						<span id="Codehighlighter1_402_471_Open_Text">
								<span style="COLOR: #000000">{<br /></span>
								<span style="COLOR: #008080">16</span>
								<span style="COLOR: #000000">
										<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />            </span>
								<span style="COLOR: #008000">//</span>
								<span style="COLOR: #008000">Else we must be using a non-IE browser.</span>
								<span style="COLOR: #008000">
										<br />
								</span>
								<span style="COLOR: #008080">17</span>
								<span style="COLOR: #008000">
										<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />
								</span>
								<span style="COLOR: #000000">            xmlhttp </span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #0000ff">false</span>
								<span style="COLOR: #000000">;<br /></span>
								<span style="COLOR: #008080">18</span>
								<span style="COLOR: #000000">
										<img src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />        }</span>
						</span>
						<span style="COLOR: #000000">
								<br />
						</span>
						<span style="COLOR: #008080">19</span>
						<span style="COLOR: #000000">
								<img src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />    }</span>
				</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080">20</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />    <br /></span>
				<span style="COLOR: #008080">21</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />    </span>
				<span style="COLOR: #008000">//</span>
				<span style="COLOR: #008000">If we are using a non-IE browser, create a javascript instance of the object.</span>
				<span style="COLOR: #008000">
						<br />
				</span>
				<span style="COLOR: #008080">22</span>
				<span style="COLOR: #008000">
						<img id="Codehighlighter1_614_651_Open_Image" onclick="this.style.display='none'; Codehighlighter1_614_651_Open_Text.style.display='none'; Codehighlighter1_614_651_Closed_Image.style.display='inline'; Codehighlighter1_614_651_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" />
						<img id="Codehighlighter1_614_651_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_614_651_Closed_Text.style.display='none'; Codehighlighter1_614_651_Open_Image.style.display='inline'; Codehighlighter1_614_651_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedBlock.gif" align="top" />
				</span>
				<span style="COLOR: #000000">    </span>
				<span style="COLOR: #0000ff">if</span>
				<span style="COLOR: #000000"> (</span>
				<span style="COLOR: #000000">!</span>
				<span style="COLOR: #000000">xmlhttp </span>
				<span style="COLOR: #000000">&amp;&amp;</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">typeof</span>
				<span style="COLOR: #000000"> XMLHttpRequest </span>
				<span style="COLOR: #000000">!=</span>
				<span style="COLOR: #000000"> 'undefined') </span>
				<span id="Codehighlighter1_614_651_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
						<img src="http://www.blogjava.net/images/dot.gif" />
				</span>
				<span id="Codehighlighter1_614_651_Open_Text">
						<span style="COLOR: #000000">{<br /></span>
						<span style="COLOR: #008080">23</span>
						<span style="COLOR: #000000">
								<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />        xmlhttp </span>
						<span style="COLOR: #000000">=</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #0000ff">new</span>
						<span style="COLOR: #000000"> XMLHttpRequest();<br /></span>
						<span style="COLOR: #008080">24</span>
						<span style="COLOR: #000000">
								<img src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />    }</span>
				</span>
		</div>
		<br />
		<font face="Tahoma" color="#a52a2a" size="2">
				<strong>然后在后面的函数中可以调用xmlhttp：（如下例）</strong>
		</font>
		<br />
		<div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee">
				<span style="COLOR: #008080"> 1</span>
				<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
				<span style="COLOR: #008000">//</span>
				<span style="COLOR: #008000">A variable used to distinguish whether to open or close the calendar.</span>
				<span style="COLOR: #008000">
						<br />
				</span>
				<span style="COLOR: #008080"> 2</span>
				<span style="COLOR: #008000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
				</span>
				<span style="COLOR: #000000">    </span>
				<span style="COLOR: #0000ff">var</span>
				<span style="COLOR: #000000"> showOrHide </span>
				<span style="COLOR: #000000">=</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">true</span>
				<span style="COLOR: #000000">;<br /></span>
				<span style="COLOR: #008080"> 3</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />    <br /></span>
				<span style="COLOR: #008080"> 4</span>
				<span style="COLOR: #000000">
						<img id="Codehighlighter1_127_1029_Open_Image" onclick="this.style.display='none'; Codehighlighter1_127_1029_Open_Text.style.display='none'; Codehighlighter1_127_1029_Closed_Image.style.display='inline'; Codehighlighter1_127_1029_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" />
						<img id="Codehighlighter1_127_1029_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_127_1029_Closed_Text.style.display='none'; Codehighlighter1_127_1029_Open_Image.style.display='inline'; Codehighlighter1_127_1029_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedBlock.gif" align="top" />    </span>
				<span style="COLOR: #0000ff">function</span>
				<span style="COLOR: #000000"> showHideCalendar() </span>
				<span id="Codehighlighter1_127_1029_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
						<img src="http://www.blogjava.net/images/dot.gif" />
				</span>
				<span id="Codehighlighter1_127_1029_Open_Text">
						<span style="COLOR: #000000">{<br /></span>
						<span style="COLOR: #008080"> 5</span>
						<span style="COLOR: #000000">
								<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />        <br /></span>
						<span style="COLOR: #008080"> 6</span>
						<span style="COLOR: #000000">
								<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />        </span>
						<span style="COLOR: #008000">//</span>
						<span style="COLOR: #008000">The location we are loading the page into.</span>
						<span style="COLOR: #008000">
								<br />
						</span>
						<span style="COLOR: #008080"> 7</span>
						<span style="COLOR: #008000">
								<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />
						</span>
						<span style="COLOR: #000000">        </span>
						<span style="COLOR: #0000ff">var</span>
						<span style="COLOR: #000000"> objID </span>
						<span style="COLOR: #000000">=</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #000000">"</span>
						<span style="COLOR: #000000">calendar</span>
						<span style="COLOR: #000000">"</span>
						<span style="COLOR: #000000">;<br /></span>
						<span style="COLOR: #008080"> 8</span>
						<span style="COLOR: #000000">
								<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />        <br /></span>
						<span style="COLOR: #008080"> 9</span>
						<span style="COLOR: #000000">
								<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />        </span>
						<span style="COLOR: #008000">//</span>
						<span style="COLOR: #008000">Change the current image of the minus or plus.</span>
						<span style="COLOR: #008000">
								<br />
						</span>
						<span style="COLOR: #008080">10</span>
						<span style="COLOR: #008000">
								<img id="Codehighlighter1_284_778_Open_Image" onclick="this.style.display='none'; Codehighlighter1_284_778_Open_Text.style.display='none'; Codehighlighter1_284_778_Closed_Image.style.display='inline'; Codehighlighter1_284_778_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" />
								<img id="Codehighlighter1_284_778_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_284_778_Closed_Text.style.display='none'; Codehighlighter1_284_778_Open_Image.style.display='inline'; Codehighlighter1_284_778_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />
						</span>
						<span style="COLOR: #000000">        </span>
						<span style="COLOR: #0000ff">if</span>
						<span style="COLOR: #000000"> (showOrHide </span>
						<span style="COLOR: #000000">==</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #0000ff">true</span>
						<span style="COLOR: #000000">)</span>
						<span id="Codehighlighter1_284_778_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
								<img src="http://www.blogjava.net/images/dot.gif" />
						</span>
						<span id="Codehighlighter1_284_778_Open_Text">
								<span style="COLOR: #000000">{<br /></span>
								<span style="COLOR: #008080">11</span>
								<span style="COLOR: #000000">
										<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />            </span>
								<span style="COLOR: #008000">//</span>
								<span style="COLOR: #008000">Show the calendar.</span>
								<span style="COLOR: #008000">
										<br />
								</span>
								<span style="COLOR: #008080">12</span>
								<span style="COLOR: #008000">
										<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />
								</span>
								<span style="COLOR: #000000">            document.getElementById(</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">opencloseimg</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">).src </span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">images/mins.gif</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">;<br /></span>
								<span style="COLOR: #008080">13</span>
								<span style="COLOR: #000000">
										<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />            </span>
								<span style="COLOR: #008000">//</span>
								<span style="COLOR: #008000">The page we are loading.</span>
								<span style="COLOR: #008000">
										<br />
								</span>
								<span style="COLOR: #008080">14</span>
								<span style="COLOR: #008000">
										<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />
								</span>
								<span style="COLOR: #000000">            </span>
								<span style="COLOR: #0000ff">var</span>
								<span style="COLOR: #000000"> serverPage </span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">calendar.php</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">;<br /></span>
								<span style="COLOR: #008080">15</span>
								<span style="COLOR: #000000">
										<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />            </span>
								<span style="COLOR: #008000">//</span>
								<span style="COLOR: #008000">Set the open close tracker variable.</span>
								<span style="COLOR: #008000">
										<br />
								</span>
								<span style="COLOR: #008080">16</span>
								<span style="COLOR: #008000">
										<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />
								</span>
								<span style="COLOR: #000000">            showOrHide </span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #0000ff">false</span>
								<span style="COLOR: #000000">;<br /></span>
								<span style="COLOR: #008080">17</span>
								<span style="COLOR: #000000">
										<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />            <br /></span>
								<span style="COLOR: #008080">18</span>
								<span style="COLOR: #000000">
										<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />            </span>
								<span style="COLOR: #0000ff">var</span>
								<span style="COLOR: #000000"> obj </span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000"> document.getElementById(objID);<br /></span>
								<span style="COLOR: #008080">19</span>
								<span style="COLOR: #000000">
										<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />            xmlhttp.open(</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">GET</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">, serverPage);<br /></span>
								<span style="COLOR: #008080">20</span>
								<span style="COLOR: #000000">
										<img id="Codehighlighter1_637_751_Open_Image" onclick="this.style.display='none'; Codehighlighter1_637_751_Open_Text.style.display='none'; Codehighlighter1_637_751_Closed_Image.style.display='inline'; Codehighlighter1_637_751_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" />
										<img id="Codehighlighter1_637_751_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_637_751_Closed_Text.style.display='none'; Codehighlighter1_637_751_Open_Image.style.display='inline'; Codehighlighter1_637_751_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />            xmlhttp.onreadystatechange </span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #0000ff">function</span>
								<span style="COLOR: #000000">() </span>
								<span id="Codehighlighter1_637_751_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
										<img src="http://www.blogjava.net/images/dot.gif" />
								</span>
								<span id="Codehighlighter1_637_751_Open_Text">
										<span style="COLOR: #000000">{<br /></span>
										<span style="COLOR: #008080">21</span>
										<span style="COLOR: #000000">
												<img id="Codehighlighter1_697_746_Open_Image" onclick="this.style.display='none'; Codehighlighter1_697_746_Open_Text.style.display='none'; Codehighlighter1_697_746_Closed_Image.style.display='inline'; Codehighlighter1_697_746_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" />
												<img id="Codehighlighter1_697_746_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_697_746_Closed_Text.style.display='none'; Codehighlighter1_697_746_Open_Image.style.display='inline'; Codehighlighter1_697_746_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />                </span>
										<span style="COLOR: #0000ff">if</span>
										<span style="COLOR: #000000"> (xmlhttp.readyState </span>
										<span style="COLOR: #000000">==</span>
										<span style="COLOR: #000000"> </span>
										<span style="COLOR: #000000">4</span>
										<span style="COLOR: #000000"> </span>
										<span style="COLOR: #000000">&amp;&amp;</span>
										<span style="COLOR: #000000"> xmlhttp.status </span>
										<span style="COLOR: #000000">==</span>
										<span style="COLOR: #000000"> </span>
										<span style="COLOR: #000000">200</span>
										<span style="COLOR: #000000">) </span>
										<span id="Codehighlighter1_697_746_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
												<img src="http://www.blogjava.net/images/dot.gif" />
										</span>
										<span id="Codehighlighter1_697_746_Open_Text">
												<span style="COLOR: #000000">{<br /></span>
												<span style="COLOR: #008080">22</span>
												<span style="COLOR: #000000">
														<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />                    obj.innerHTML </span>
												<span style="COLOR: #000000">=</span>
												<span style="COLOR: #000000"> xmlhttp.responseText;<br /></span>
												<span style="COLOR: #008080">23</span>
												<span style="COLOR: #000000">
														<img src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />                }</span>
										</span>
										<span style="COLOR: #000000">
												<br />
										</span>
										<span style="COLOR: #008080">24</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />            }</span>
								</span>
								<span style="COLOR: #000000">
										<br />
								</span>
								<span style="COLOR: #008080">25</span>
								<span style="COLOR: #000000">
										<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />            xmlhttp.send(</span>
								<span style="COLOR: #0000ff">null</span>
								<span style="COLOR: #000000">);<br /></span>
								<span style="COLOR: #008080">26</span>
								<span style="COLOR: #000000">
										<img id="Codehighlighter1_785_1020_Open_Image" onclick="this.style.display='none'; Codehighlighter1_785_1020_Open_Text.style.display='none'; Codehighlighter1_785_1020_Closed_Image.style.display='inline'; Codehighlighter1_785_1020_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" />
										<img id="Codehighlighter1_785_1020_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_785_1020_Closed_Text.style.display='none'; Codehighlighter1_785_1020_Open_Image.style.display='inline'; Codehighlighter1_785_1020_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />        }</span>
						</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #0000ff">else</span>
						<span style="COLOR: #000000"> </span>
						<span id="Codehighlighter1_785_1020_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
								<img src="http://www.blogjava.net/images/dot.gif" />
						</span>
						<span id="Codehighlighter1_785_1020_Open_Text">
								<span style="COLOR: #000000">{<br /></span>
								<span style="COLOR: #008080">27</span>
								<span style="COLOR: #000000">
										<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />            </span>
								<span style="COLOR: #008000">//</span>
								<span style="COLOR: #008000">Hide the calendar.</span>
								<span style="COLOR: #008000">
										<br />
								</span>
								<span style="COLOR: #008080">28</span>
								<span style="COLOR: #008000">
										<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />
								</span>
								<span style="COLOR: #000000">            document.getElementById(</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">opencloseimg</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">).src </span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">images/plus.gif</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">;<br /></span>
								<span style="COLOR: #008080">29</span>
								<span style="COLOR: #000000">
										<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />            </span>
								<span style="COLOR: #008000">//</span>
								<span style="COLOR: #008000">The page we are loading.</span>
								<span style="COLOR: #008000">
										<br />
								</span>
								<span style="COLOR: #008080">30</span>
								<span style="COLOR: #008000">
										<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />
								</span>
								<span style="COLOR: #000000">            </span>
								<span style="COLOR: #0000ff">var</span>
								<span style="COLOR: #000000"> serverPage </span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">blank.php</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">;<br /></span>
								<span style="COLOR: #008080">31</span>
								<span style="COLOR: #000000">
										<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />            showOrHide </span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #0000ff">true</span>
								<span style="COLOR: #000000">;<br /></span>
								<span style="COLOR: #008080">32</span>
								<span style="COLOR: #000000">
										<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />            <br /></span>
								<span style="COLOR: #008080">33</span>
								<span style="COLOR: #000000">
										<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />            document.getElementById(objID).innerHTML </span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">""</span>
								<span style="COLOR: #000000">;<br /></span>
								<span style="COLOR: #008080">34</span>
								<span style="COLOR: #000000">
										<img src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />        }</span>
						</span>
						<span style="COLOR: #000000">
								<br />
						</span>
						<span style="COLOR: #008080">35</span>
						<span style="COLOR: #000000">
								<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />        <br /></span>
						<span style="COLOR: #008080">36</span>
						<span style="COLOR: #000000">
								<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />        <br /></span>
						<span style="COLOR: #008080">37</span>
						<span style="COLOR: #000000">
								<img src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />    }</span>
				</span>
		</div>
<img src ="http://www.blogjava.net/scorpionchinas/aggbug/101154.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/scorpionchinas/" target="_blank">scorpionchinas</a> 2007-02-28 15:40 <a href="http://www.blogjava.net/scorpionchinas/archive/2007/02/28/101154.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>开始</title><link>http://www.blogjava.net/scorpionchinas/archive/2007/02/26/100699.html</link><dc:creator>scorpionchinas</dc:creator><author>scorpionchinas</author><pubDate>Mon, 26 Feb 2007 02:54:00 GMT</pubDate><guid>http://www.blogjava.net/scorpionchinas/archive/2007/02/26/100699.html</guid><wfw:comment>http://www.blogjava.net/scorpionchinas/comments/100699.html</wfw:comment><comments>http://www.blogjava.net/scorpionchinas/archive/2007/02/26/100699.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/scorpionchinas/comments/commentRss/100699.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/scorpionchinas/services/trackbacks/100699.html</trackback:ping><description><![CDATA[      <font face="Tahoma">今天一个住在Berlin的同学过来申请论文题目。顺便提出和我一起参加一次大学生竞赛活动。就是编辑一个使用eBayAPI的程序。我觉得还是很不错的。所以初步定下来用AJAX。用SOAP和WSDL来进行一些交互的操作。打算把ebay，google，skype，amazon等几个大的网站的services集成在一个页面。具体方案还没有。只是大体有个思路。<br /><br />      详细信息：</font><a href="http://entwickler.ebay.de/edu/wettbewerb.html"><font face="Tahoma">http://entwickler.ebay.de/edu/wettbewerb.html</font></a><br /><font face="Tahoma">                      </font><a href="http://api20.blogspot.com/"><font face="Tahoma">http://api20.blogspot.com/</font></a><br />       <br />       辅助资料：<a href="http://www.bookgo.org/">http://www.bookgo.org/</a> （计算机英文原版书下载）<br />                           <a href="http://ebook.vopen.net/html/26/index.html">http://ebook.vopen.net/html/26/index.html</a>（计算机书籍下载）<br /><img src ="http://www.blogjava.net/scorpionchinas/aggbug/100699.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/scorpionchinas/" target="_blank">scorpionchinas</a> 2007-02-26 10:54 <a href="http://www.blogjava.net/scorpionchinas/archive/2007/02/26/100699.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>