JavaScript语法1

var s="3.14xyz";
	alert(typeof(s));//string
	document.write(alert(parseInt(s)));//3
	document.write(alert(parseFloat(s)));//3.14
	document.write(alert(isNaN(s)));//true
	document.write(alert(parseInt(s,16)));//3

猜你喜欢

转载自blog.csdn.net/weixin_42565135/article/details/85298930