English 中文(简体)
• 如何以多种方式积极处理营地提供的回归价值? [闭门]
原标题:How to handle dynamically returning values given by php with multiple lines? [closed]
  • 时间:2011-11-20 19:12:03
  •  标签:
  • javascript

I m试图实现一个指数处理器。 现在,我可以以超文本方式点击一个领域,而第二个窗口则出现。 然后,在第二页点点点击了几个县之一,在第一个窗口的现场收回了价值。 这方面的工作如下:

self.opener.document.getElementById( idOfFieldOnWindow1 ).value =  myValue ;

此处的“myValue”值由php从数据库中读取。 这种价值也可以是一种具有不止一条线的案文(它至少包含一个或一个以上的分界线)。 如果我把这些价值观写进法典中的话,它给我一个 Java文的特例:

ERROR: unterminated string literal
setValue("Text on which a linebreak follows

我怎么能解决这个问题,我能够回头来,以便在第一个领域,包括分界线,看到这一价值?

最佳回答

You need to turn your actual line break " " into a Javascript text that will produce a line break "\n".

问题回答

暂无回答




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

热门标签