2024年6月10日发(作者:)
一,使用jquery 创建append
$("#title_show").append(" onclick='gURL(""+url+"")' id='tab"+i+"' >"+" > "+title+"
//注:通过创建生成的js需通过转义传输参数
二,查找
中的一组,等标签位置$('#title_show a:gt(2)').remove();//删除id=title_show
[0],[1],[2],[3], 选中大于2{gt(0)}的对象。
二使用js appendChild 创建(适用于较少的标签)
var v_span=Element("a");//创建标签
v_ext =" > "+title;
v_="tab"+i;
v_k=function gURL(URL){
if(url!=''){
标签里,中
mentById("jsp").src=encodeURI(encodeURI(url));
}
};
mentById("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","?qx="+qxT+"&wt="+wtT+"&dqname="+dq
nameT+"&zzdqCode="+codeT+"&zzTime="+zztimeT+"&zzqk="+zzqkT+"&ydqk
="+ydqkT+"&ifwtdb="+iswtdb+"&ifdqdb="+isdqdb+"&status=2") ;
*/
发布评论