The first question
Write a method to find the byte length of a string
The second question
How to control line breaks in alert
The third question
Explain document.getElementById("ElementID") .style.fontSize="1.5em"
The fourth question
Separate an effect similar to the picture into css and html
The fifth question
According to the format xxxx year xx month xx day xx time xx Dynamically display time in minutes and xx seconds. If less than 10 is required, add 0
Question 6
Write a method to remove duplicate elements from an array
Question 7
Name 3 or more scripts that are compatible with ff and ie Question
Question 8
Write a simple ajax example as required. If it is simple and meaningless, I will not write it
Answer
Code for the first question:
]
Second question: alert is in progress for line breaks
If you need to introduce external Js, you need to refresh to execute
]
The third question: em is a Relative units.
I won’t do the fourth question.
[Ctrl A Select all Note:
If you need to introduce external Js, you need to refresh to execute
]
[Ctrl A Select all Note:
If you need to introduce external Js, you need to refresh to execute
]
[Ctrl A Select all Note:
If you need to introduce external Js, you need to refresh it to execute
]
So serious, first question It is best to add parentheses to function definitions
It seems that only expressions can be without parentheses (do you want to show off :P)
In addition, the eighth question you wrote is too exaggerated. It is probably like this
OXMLHttprequest=new XMLHttpRequest();
OXMLHttprequest.open("post","/XXX.php",true)
OXMLHttprequest.onReadyStateChange=function()
{
if(OXMLHttprequest.readyState!=4) continue; alert(OXMLHttprequest.responseText); OXMLHttprequest.onReadyStateChange=null; OXMLHttprequest=null; } OXMLHttprequest.send("domain=baidu");