1,HTML source code£º <html> <head> <title>How to use IllegalArgumentException</title> </head> <body> <script src="jsjava.js"></script> <script> function User(){ this.setName=function(name){ if(!isNaN(name)){ throw new IllegalArgumentException(IllegalArgumentException.ERROR,"not a valid argument!"); } this.name=name; } } var user=new User(); try{ user.setName(568); }catch(e){ document.write(e.message); } </script> </body> </html> 2,The display text is:

not a valid argument!