English 中文(简体)
Javascript Code dont work in IE8/7
原标题:Javascript code doesnt work in IE8/7

该法典在hr/ff/ie9 进行,但并非e8/7。

http://jsfiddle.net/vDZJM/6/>rel=“nofollow> http://jsfiddle.net/vDZJM/6/

Here is the JS:

function doDistricts(theData){
    var district="";
    var district="";
    $(theData).find("district").each(function(){

        var theDistrict = $(this);
        var districtName = theDistrict.text();
        var level = theDistrict.attr("level");
        var attr = theDistrict.attr( deleted );
        if(typeof attr !==  undefined  && attr !== false){
            district=district+ 			<div class="district deleted">
 ;
            district=district+ 				<header class="clearfix doNode" data-role-id=" +districtName+ " data-role-nodeLevel=" +level+ " data-role-nodeValue=" +districtName+ ">
 ;
            district=district+ 					<span class="arrow"></span>
 ;
            district=district+ 					<img src="/img/address_list/map.png" alt=" +districtName+ " class="icon" />
 ;
            district=district+ 					<span class="text"> +districtName+ </span>
 ;
            district=district+ 					<a class="add" href="#">Add</a>
 ;
            district=district+ 				</header>
 ;
            district=district+ 				<div class="children"></div>
 ;
            district=district+ 			</div>
 ;
        }else{
            district=district+ 			<div class="district">
 ;
            district=district+ 				<header class="clearfix doNode" data-role-nodeLevel=" +level+ " data-role-id=" +districtName+ " data-role-nodeValue=" +districtName+ ">
 ;
            district=district+ 					<span class="arrow"></span>
 ;
            district=district+ 					<img src="/img/address_list/map.png" alt=" +districtName+ " class="icon" />
 ;
            district=district+ 					<span class="text"> +districtName+ </span>
 ;
            district=district+ 					<a class="remove" href="#">Remove</a>
 ;
            district=district+ 				</header>
 ;
            district=district+ 				<div class="children"></div>
 ;
            district=district+ 			</div>
 ;
        }

    });
    return district;
}

$( div.1 ).html(doDistricts($(theData)));

在具有更多代码的工作环境中,内容生成,但<代码><header>tag过早关闭,即应在<代码><内的所有代码;header> tag(<span=“ar”>等)实际上不在此限。 为什么这样做?

最佳回答

如果你的文件是html5,你在增加人力部成员时需要使用内力。

http://jdbartlett.com/innershiv/

问题回答

暂无回答




相关问题
selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

How to fire event handlers on the link using javascript

I would like to click a link in my page using javascript. I would like to Fire event handlers on the link without navigating. How can this be done? This has to work both in firefox and Internet ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Clipboard access using Javascript - sans Flash?

Is there a reliable way to access the client machine s clipboard using Javascript? I continue to run into permissions issues when attempting to do this. How does Google Docs do this? Do they use ...

javascript debugging question

I have a large javascript which I didn t write but I need to use it and I m slowely going trough it trying to figure out what does it do and how, I m using alert to print out what it does but now I ...

Parsing date like twitter

I ve made a little forum and I want parse the date on newest posts like twitter, you know "posted 40 minutes ago ","posted 1 hour ago"... What s the best way ? Thanx.

热门标签