English 中文(简体)
互联网探索者8不能取代新线,而互联网探索者9、火ox和神hr可以取代新线?
原标题:Internet explorer 8 cannot replace newline, while internet explorer 9, firefox and chrome can?

在我的网站上,我有大量图像及其所附文字,从服务器上发送至json_encode($object),如:

<script type="text/javascript">
   var jsonimgs =  [["90","1","Foraeldreforeningens Chris McDonald-arrangement i aulaen ma. 10. oktober 2011 
Fotos: Silas Staal ","cmd13.jpg","15","0"],["91","2","Foraeldreforeningens Chris McDonald-arrangement i aulaen ma. 10. oktober 2011
Fotos: Silas Staal ","cmd1.jpg","15","1"],["92","3","Foraeldreforeningens Chris McDonald-arrangement i aulaen ma. 10. oktober 2011
Fotos: Silas Staal ","cmd2.jpg","15","2"]] ;
   jsonimgs = jsonimgs.replace(/(
)|(
)/g,  <br /> );
   var images = jQuery.parseJSON(jsonimgs);
</script>

这种图像物体被用于处理图像之间的导航。

各位看一把所有新线路改为<br> tag,因为否则,一个例外由.parseJSON功能推翻,图像变数不产生。

这在互联网探索者9、最新版的火法英和 go色神学中做了罚款。 但是,当我试图在互联网探索者8上运行时,这并不奏效。 我的猜测是,互联网探索者8并不出于某种原因取代新的线标,因此,<代码>.parseJSON/code”的功能不可行,因此,图像变数不产生。

因此,我的问题是:我如何确保图像变数总是在所有浏览器中产生,无论在<代码>日上可能具有何种特性。 服务器发送的变量?

祝福。

问题回答

暂无回答




相关问题
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.

热门标签