1. Description of the problem:0 ns_error_dom_bad_uri:access to restricted URI deniedajaxOptions:errorthrownError:NS_ERROR_DOM_BAD_URI:Access To restricted URI deniedundefinedLocal testing:File:///c:/inetpub/wwwroot/myjs/loadhtml/ajaxload.htmlie,
The full name of AJAX is Asynchronous JavaScript and XML. Asynchronous is asynchronous, which is different from the synchronous method used in traditional web development.
Example: Ajax working principle diagram and Web working principle diagram
1.
Ajax asynchronously loads image instance analysis,
This document describes how to asynchronously load images using ajax. We will share this with you for your reference. The details are as follows:
Images are usually relatively large, so they are
$. Ajax () method parameters,. ajax method parameters
It is very important to use ajax in a flexible manner. This article first introduces several ajax methods and analyzes them through examples. For details, see the following.
1. url:
It must be a
Simple Introduction: Do not use libraries (frameworks) to write ajax by yourself. A brief introduction to ajax
Usually, ajax is used to request data, load a library (framework), and perhaps only maybe uses its ajax part.
To write ajax, you can go
In js, there are N data types. Here we will introduce the commonly used data type judgment methods, including Number ). Including integer, floating point, Boolean, String, array, null, Undefined, etc.
Let's take a look at one of my interview
The _ FILE _ constant like PHP does not exist in javascript files for us to obtain the path of the current FILE. After research, we can use the following methods:
1. Get the current JS file path in jQuery
It is relatively simple to obtain the path
In the last development, I encountered the problem of setTimeout parameter passing in IE. in IE, setTimeout does not pass in parameters. For example, the following code does not pass in a in IE, two Parameters of BSetTimeout (function (a, B ){Alert (
IntroductionThis article mainly discusses the ECMAScript execution context and related ECMAScript executable code.
DefinitionEach time the controller is transferred to ECMAScript executable code, it enters an execution context.
Execution context
Framework comparison
Table 1 provides a detailed comparison of the five frameworks discussed in this article
Prototype
JQuery
YUI
ExtJS
MooTools
Latest Version
1.6.1
1.4.1
3.00
3.1
1.2
In HTML 4.0 Strict and XHTML 1.0 STRICT, the target attribute cannot be used in the tag. This is a headache for web designers. it is still allowed in the Transition specification. however, we can solve this problem through some methods.The target
This is the simplest usage:(Function (){Alert ('One second later ...');}). Delay (1000 );This function will be automatically executed in 1 second.Let's take a look at the implementation method of the delay function:Delay: function (delay, bind, args
Fill in the blanks so that the following alert (0) can be correctly displayed. At least two different ideas are listed.
Window. alert = function () {}; ______; alert (0 );
Solution:
Method 1:
Window. alert = function () {}; delete window. alert;
Rules for writing regular expressions:"/The rule must be written in the middle of two slashes./".
(.: Decimal point) is used to match all characters except line breaks.
(\ S: Lower-case backslash (s) is used to match a single space character,
Copy codeThe Code is as follows:Function CallBackObject (){This. XmlHttp = this. GetHttpObject ();}CallBackObject. prototype. GetHttpObject = function () // Add the GetHttpObject common method to the CallBackObject prototype dynamically.{// Step 1:
Method:You just put together the rss xml format, output it, set the HTTP Header, and Mark content-type as application/XML. Common Code:Copy codeThe Code is as follows:# Post_controller: feed ()Def feedRequire "rss"Articles = Article. find: all,:
After reading the cascade menu made by Daxia, I also made an axe to the class. Hey, it took some time to paste a cascade menu. In this example, the member name is automatically displayed as long as you select the member category name:First, create a
I. XMLHttpRequest
The Code is as follows:" method = "post">
Ii. jquery ajax. post
1. jQuery $. post () method
The $. post () method sends an http post request to request data from the server.
Instance
The Code is as follows:$ ("Button"). click
Jquery form is a very good ajax form submission plug-in. Today I will introduce you to the application example of jquery form's ajaxSubmit (), hoping to help you.
HTML
First, we load the jquery library and jquery. form. js plug-in. Jquery. form. js
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service