Ideas:The idea is actually very simple, when Ajax executes, an event object is generated that contains the size of the file to be loaded and the size of the currently loaded complete section, which calculates the percentage by both valuesEvent descriptionOnProgress triggered when the browser is loading media dataOnLoad triggers when loading media data is complete after the OnProgress eventA picture: All the values contained in the event object, where total is the overall size, loaded is the size
can also bind properties with V-bindSummary:
Subcomponents Create a property in props that receives the value passed by the parent component.
Calling subcomponents in parent component
Binding the properties created in subcomponents props in the Subcomponents tab
Assign the value that you want to the child component to this property, such as the MSG of the parent component
Second, subassembly passes data to parent component1, modify the Child.vue as follows:123456789Ten
Tutorial
var Incomejson = eval (' (' +xmlhttp.responsetext + ') ');
Incomejson.name//value is Xiaozhang
If the Xmlhttp.responsetext is a JSON string that is transmitted asynchronously, assume that the contents are: {"name": "Xiaozhang"}
Look at a string to convert to a JSON function
Analysis
{
Name: "Down.111cn.net",
role:[
{
Name: "Road Fly",
skills:{
skill:["Www.111cn.net", "domineering"]
}
},
{
1 Switch statements are useful:The switch statement is used to perform different actions based on different conditions.Whenever a variable condition is met, the current case content is executed. The break keyword is used to jump out of a switch code block. Terminates execution of the switch code block. If the keyword is omitted, the next block of code for the Swith statement is executed.The default keyword specifies what to do when a match does not exist. The default keyword can appear only once
JS Example Tutorial: JavaScript Events method
The action of the event, can detect the JavaScript.
ActivitiesBy using JavaScript, we have the ability to create dynamic Web pages. The action of the event, can detect the JavaScript.
Each element has certain events on the Web page that can trigger JavaScript functions. For example, we can use the OnClick event with the contents of a button to indicate that a
JS setFullYear () toutcstring () getday () Example Tutorial
First look at the setFullYear () Example:
Results.
Thu Nov 2008 08:32:43 UTC
toUTCString () instance.
Answer Thu, Nov 2008 08:36:36 UTC
Getday ()
Use Getday () and an array to write a business day, not just a number.
result.
Today it is Thursday
cgi|javascript|js| Tutorial
Use JavaScript instead of CGI
You might be familiar with CGI scripts, and you can use CGI to pass numbers or variables from one page to another on a form. Of course, you can use "POST" to pass a variable to a separate thread without appearing in the browser, or to encode the variable to a URL using "get".
JavaScript cannot use the Post method when a variable is processed on the s
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.