易截截图软件、单文件、免安装、纯绿色、仅160KB

修改 html 标签属性

修改 checked 属性
     
    var sex = '${entity.sex}';
   if(sex == '男')
   {  
       
     //document.all.sexCk1.checked=true; 这种火狐不支持
     document.getElementById('sexCk1').checked = true;
     document.getElementById('sexCk2').checked = false;
   }else if(sex == '女'){
      
    document.getElementById('sexCk1').checked = false;
    document.getElementById('sexCk2').checked = true;
   }
 
修改 class 属性
 
        // 处理课程进度
                var progress = '<s:property value="progress" /> ';
                //alert(' progress :'+progress);
                if(progress >= 1){
                   document.getElementById('javase').className = 'passed';
                }
                if(progress >= 2){
                   document.getElementById('web').className = 'passed';
                }
                if(progress >= 3){
            &nb


相关文档:

html 获得浏览器高度

有时页面需要获得用户浏览器的高度才能确定内容显示在哪里,代码
<div style="position:absolute; left:0; top:expression(document.body.clientHeight/2-document.body.clientHeight/4)">
</div>
中,expression(document.body.clientHeight/2)即为获得浏览器高度再除以2 ......

去除HTML格式 截取字符串

  //截取部分内容方法
        public static string strvalue(string value, int length)
        {
            string strValue = NoHTML(value);// 去除HTML标记
 &nb ......

通过HTML 注释性语法判断IE版本

Example:
1.<!--[if !IE]><!--> 除IE外都可识别 <!--<![endif]-->
2.<!--[if IE]> 所有的IE可识别 <![endif]-->
3.<!--[if IE 5.0]> 只有IE5.0可以识别 <![endif]-->
4.<!--[if IE 5]> 仅IE5.0与IE5.5可以识别 <![endif]-->
5.<!--[if gt IE 5.0]> IE ......

html重新加载问题

   最近在使用ext嵌入html页面的过程中,遇到一个问题。我们页面都是用html制作的,用iframe的方式嵌入到ext的panel里。其中有一个页面是在按钮触发的时候加载进去的,但是重新刷新浏览器,页面仍然嵌入在panel中,并没有卸载掉,在页面上设置清空缓存也没有效果。
   后来我发现,只有在浏览器地址里 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号