惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

V
V2EX
小众软件
小众软件
GbyAI
GbyAI
B
Blog RSS Feed
月光博客
月光博客
A
About on SuperTechFans
Microsoft Security Blog
Microsoft Security Blog
Blog — PlanetScale
Blog — PlanetScale
U
Unit 42
云风的 BLOG
云风的 BLOG
P
Proofpoint News Feed
Recent Announcements
Recent Announcements
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Vercel News
Vercel News
F
Fortinet All Blogs
Apple Machine Learning Research
Apple Machine Learning Research
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
雷峰网
雷峰网
Google DeepMind News
Google DeepMind News
MongoDB | Blog
MongoDB | Blog
Engineering at Meta
Engineering at Meta
aimingoo的专栏
aimingoo的专栏
博客园_首页
G
Google Developers Blog

博客园 - Fei飞

关于下划线的有无,和超链接的颜色变化 Action里跳转到错误页的另一种方法(struts1.2) - Fei飞 - 博客园 java获取本机IP - Fei飞 - 博客园 jdk环境变量 Tomcat虚拟路径 - Fei飞 - 博客园 杨辉三角的画法(c语言) - Fei飞 - 博客园 完成SSh构架的搭建 js表单验证控制代码大全 颜色编码表 mysql中文配置 js实现按钮控制加减 Could not execute JDBC batch update C的错误分析 用js获取select所选的值 struts中,防止F5刷新,造成重复投票方法 我是大海里的一页扁舟 JDBCTM中Statement接口提供的execute、executeQuery和executeUpdate之间的区别 html标签大全 struts标签库
类型转换和页面获取值(总爱忘的)
Fei飞 · 2008-02-18 · via 博客园 - Fei飞

String转化为int
int i = Integer.parseInt([String]);
int i = Integer.valueOf([String]).intValue();
另外:
int i  =Double.parseDouble([String]);

int转化为String
String s = String.valueOf(i);
String s = Integer.toString(i);
String s = "" + i;

获取值
String型:
String getid=(String)request.getParameter("id");
int型:
int getid=Integer.parseInt(request.getParameter("id"));