一,使用jquery 创建append
$("#title_show").append("<a href='javascript:void(0)' onclick='gURL(\""+url+"\")' id='tab"+i+"' >"+"  >  "+title+"</a>");
  //注:通过创建生成的js需通过转义传输参数
二,查<div></div>中的一组<a>,<input>等标签位置
$('#title_show a:gt(2)').remove();//删除id=title_show  <div>标签里,中<a>[0],<a>[1],<a>[2],<a>[3], 选中大于2{gt0}的对象。
二使用js appendChild 创建(适用于较少的标签
var v_ateElement("a"javascript void 0 是什么意思);//创建标签
             
              v_span.innerText =" > "+title;
              v_span.id="tab"+i;
              lick=function gURL(URL){
                  if(url!=''){
                        ElementById("jsp").src=encodeURI(encodeURI(url));
                        }
              };
              ElementById("title_show").appendChild(v_span); 
//生成标签
三,对标签操作
1.$().css()设置样式
2.$().attr()设置属性;
       
  /*      var qxT = encodeURIComponent(encodeURIComponent(qx));
        var wtT = encodeURIComponent(encodeURIComponent(wt));
        var codeT=encodeURIComponent(encodeURIComponent(code));
        var dqnameT= encodeURIComponent(encodeURIComponent($.trim($('#dqname').val())));
        var zzqkT= encodeURIComponent(encodeURIComponent(zzqk));
        var ydqkT= encodeURIComponent(encodeURIComponent(ydqk));
        var iswtdb=encodeURIComponent(encodeURIComponent(ifwtdb));
        var isdqdb=encodeURIComponent(encodeURIComponent(ifdqdb));
        var zztimeT=encodeURIComponent(encodeURIComponent(zztime));
        $("#ifr").attr("src","dqwtzzUpdate.do?qx="+qxT+"&wt="+wtT+"&dqname="+dqnameT+"&zzdqCode="+codeT+"&zzTime="+zztimeT+"&zzqk="+zzqkT+"&ydqk="+ydqkT+"&ifwtdb="+iswtdb+"&ifdqdb="+isdqdb+"&status=2") ;
      */

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。