Home > Database > Mysql Tutorial > body text

jsp页面调用applet实现人民币的大小写转换 (一)_MySQL

WBOY
Release: 2016-06-01 14:06:54
Original
1278 people have browsed it

人民币applet



实现方法一


applet实现页面是rmb.jsp,此页面是通过applet来实现人民币小写转换成大写的。此页面有三个变量需要在载入classes的时候进行初始化:








变量RGB_Back是初始化背景色的,修改次变量可以使applet的背景色跟自己页面的风格一样;变量RGB_Fore是初始化字体的颜色; WIGTH要和applet的宽度一样,这个变量是保证显示的转换信息在中间显示。

此种方法不能传递值给页面trans.jsp,只能显示并且不能copy。

 

页面代码如下:


人民币小写转换成大写



function trans(){


   //取变量的值


rmb_test.value;


   //给applet赋变量的值


   document.myApplet.setRMB(aaa);


   document.myApplet.repaint();


   return true;


}






source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!