以下代码:input验证码框,输入非数字或非12位时,红框提示;每4位加一个空格 //input验证码框,输入非数字或非12位时,红框提示;每3位加一个空格 $(".text").focus(function(){ $(this).keyup(function(){ var num = /^[0-9]*$/; var verifyValue = $(this).val(); var deleteLogo = $(".delete-logo");//删除的小叉号 ve
# def change_name(name):# global school # school = "Mage Linux"# print("before change",name,school)# name ="Alex li" #这个函数就是这个变量的作用域# age =23# print("after change",name) 只有字符串和整数变量的全局变量不能再
function toThousands(num) { var num = (num || 0).toString(), result = ''; //判断是否带小数点 if (num.split('.')[1]) { var numInt = num.split('.')[0], numFlo = num.split('.')[1]; result = formatter(numInt) + '.' + numFlo } else { result = formatter(num); } re
print('我考了%d分'%20) msg=''' ---------info of %s----------- name: %s age: %d #字符串不能放到%d处 job: %s salary: %f you will be retired in %s years #数字可以放到%s处 ---------end--------------- ) print(msg)