📄 ajaxmanager4_column1.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Introduction to Ajax Tutorial</title>
</head>
<body>
<p class="main">
<strong>Line 6:</strong> Now we are getting into the guts of
the function. To use XMLHttpRequest with Internet Explorer 5
we need to use an Active X object where as Mozilla based
browsers, Opera and Safari support XMLHttpRequest directly.
So we have to create a little conditional switch to ensure
that the right method is used for the right browsers. We do
this by fist creating a variable named x and checking for the
existence of an ActiveX object using a conditional operator.
If an activeX object is found then the statement uses the
method for IE if not it skips over to using XMLHttpRequest
that is used by the other modern browsers.
</p>
<p class="main">
For Internet Explorer, if we wanted to, we could use try and
catch JavaScript methods to create some conditional branches
to implement version dependent instances of XMLHTTP. For
example Msxml2.XMLHTTP.3.0. In the next tutorial, we will
implement these methods because they also are useful for
error catching.
</p>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -