1: The variable must be added with var, otherwise an empty string will be displayed, for example, var n = 7; if there is no var console.info(n), the output is empty. After adding var, it is a local variable
. 2: Pay attention to the writing of setTimeout and setInterval. The method parameter cannot be passed in a string, otherwise it will not be executed
Correct :
setInterval(function(){
getStatus()
}, 2000);
Error:
setInterval("getStatus()", 2000);
3: Ajax request, if it is polling, Be sure to add a random string, otherwise it will only be executed once. For example:
$.ajax({
url: '/orders/check',
cache: false,
data: {random: Math.ceil(Math.random()*999999)},
success: function(res){
}
})
4 : Sometimes using the status variable in js will always return an empty string
5: The dialog of jquery ui is used under ie8. If there are parameters, it will be invalid. It should be changed in another way, as follows
$("#reward_modal").dialog( 'open')
$("#reward_modal").dialog('option', {width: 485})
$("#reward_modal").dialog({autoOpen: false, width: 485})
$("#reward_modal").dialog( 'open')
6: Flash video tags such as embed will block the main div. The solution is to add wmode="opaque" to the embed tag and set the div z-index
7: new Date("2018-10-12 14:22 :23") This way of writing is not supported under ie7 and ie8
8: The input propertychange event is invalid under ie8
ie7 and 8 attention problems
Guess you like
Origin http://43.154.161.224:23101/article/api/json?id=326530922&siteId=291194637
Recommended
Ranking