Home > front end >  Vs code to open the Google browser page display incomplete
Vs code to open the Google browser page display incomplete

Time:12-12

The same code, my classmate Google browser to display a complete, my browser display incomplete, why is this? The code is as follows:



<meta charset="UTF-8">
<meta name="viewport" content="width=device - width, initial - scale=1.0" & gt;
SessionStorage

<body>
Name:
Age:

<script>
//add data
Document. The getElementById (' sessionStorageId '). The onclick=function () {
//get the value of the name and age fields
Var username=document. GetElementById (" username "). The value;
Var age=document. GetElementById (" age "). The value;
//define a user formation is used to store the information
Var user={
Username: the username,
Age: the age
}
//use the stringify () will be a JSON object serialization and deposit to the sessionStorage
Window. The sessionStorage. SetItem (' user 'JSON. Stringify (user));
}

Document. The getElementById (' getsessionStorageId '). The onclick=function () {
Var value=https://bbs.csdn.net/topics/window.sessionStorage.getItem (" user ");
Alert (value);
}

//remove all data
Document. The getElementById (' clearsessionStorageId '). The onclick=function () {
Window. The sessionStorage. The clear ();
}
</script>

CodePudding user response:

Just a few things, only shows are not compatible problems code and should not appear this kind of problem, may be you hold something, the kernel what files to the browser's lost or blocked, suggest reloading the browser, and you look at the above those who bring their own collection of web pages, feel it is the time of loading system automatic loading, is likely to be the set of the skin, a Google actually not Google browser

CodePudding user response:

The browser version is too old? There is an error in the console?

CodePudding user response:

reference 1/f, sha worm agent reply:
just a few things, just show all don't code compatibility problems, should not appear this kind of problem, may be you hold something, the kernel what files to the browser's lost or blocked, suggest reloading the browser, and you look at the above those who bring their own collection of web pages, and feel it is the time of loading system of automatically, is likely to be the set of the skin, a Google actually not Google browser

I don't know why all browser is like this

CodePudding user response:

reference 1/f, sha worm agent reply:
just a few things, just show all don't code compatibility problems, should not appear this kind of problem, may be you hold something, the kernel what files to the browser's lost or blocked, suggest reloading the browser, and you look at the above those who bring their own collection of web pages, and feel it is the time of loading system of automatically, is likely to be the set of the skin, a Google actually not Google browser

I don't know why all browser is like this

CodePudding user response:

This thing should not be problems, I copy your code, shows it's no problem, is it what did you pack your browser rendering prevented?

CodePudding user response:

reference 5 floor sha worm agent reply:
is this thing should not be a problem, I copy your code, and shows no problem, is it what did you pack your browser rendering prevented?

So also updated the how to do

CodePudding user response:

Comment out the js code first, and see if I can, according to the normal can js code up bit by bit and see where there is a problem,

CodePudding user response:

Upstairs brother right, js comments first, and then you look at the console, you have a node without the input box, and button

CodePudding user response:

Wu! I am a little white, but it seems to have a mistake Uncaught TypeError: always set a property 'onclick' of null
The at sessionStorage. HTML: 19

CodePudding user response:

Wu! I am a little white, but it seems to have a mistake Uncaught TypeError: always set a property 'onclick' of null
The at sessionStorage. HTML: 19

CodePudding user response:

Your js code in the HTML of the page? The location of the post code is not the same with you?

CodePudding user response:

The
reference 11 floor jio's reply:
js code in the HTML of the page above you? The location of the post code is not the same with you?

As is the paper, I tried all computer browser page is the same as incomplete

CodePudding user response:

The
reference 11 floor jio's reply:
js code in the HTML of the page above you? The location of the post code is not the same with you?

As is the paper, I tried all computer browser page is the same as incomplete

CodePudding user response:

Copy the HTML code directly sending again

CodePudding user response:

On the 14th floor jio
reference's reply:
directly copy the HTML code sending again




<meta charset="UTF-8">
<meta name="viewport" content="width=device - width, initial - scale=1.0" & gt;
SessionStorage

<body>
Name:
Age:
  • Related