码迷,mamicode.com
首页 > Web开发 > 详细

常用js补充1

时间:2014-09-08 08:32:46      阅读:176      评论:0      收藏:0      [点我收藏+]

标签:style   color   os   io   ar   文件   cti   sp   html   

谷歌js调试

f12进入js调试模式

打到相应的js文件在js程序中打断点

进行调试时按F10走一步

F8走完

用来显示操作信息

<script>

window.onload=function ret(){

var msg = ‘${requestScope.msg}‘;

if(msg != "" && msg != null){

alert(msg);

}

}

</script>

 

单选更换其文本框的值

<input name="btProductModel.productType" checked=" checked"  type="radio" onclick="changeShow(this.value)" value="01">预投生产

 

<input name="btProductModel.productType"  type="radio"  checked=" checked" onclick="changeShow(this.value)" value="03">返修生产

 

 

 

function changeShow(value){

if(value=="01"){

document.getElementById("productcode").innerHTML="产品编号";

document.getElementById("productname").innerHTML="预投产品";

}else{

document.getElementById("productcode").innerHTML="返修编号 ";

document.getElementById("productname").innerHTML="原合同号";

}

}

 

关闭窗口

function closeWindows() {

window.open(‘‘, ‘_parent‘, ‘‘);

window.opener = window;

window.close();

}

常用js补充1

标签:style   color   os   io   ar   文件   cti   sp   html   

原文地址:http://blog.csdn.net/u012750578/article/details/39134287

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!