Skip to main content
Known Participant
December 12, 2017
解決済み

getting error in JavaScript

  • December 12, 2017
  • 返信数 1.
  • 594 ビュー

hi, i'm getting "SyntaxError: missing ; before statement" error in bellow code. can u pls help me to solve this issue. thanks..

var s1 = getField("aa").valueAsString;

var s2 = getField("bb").valueAsString;

event.value = "THIS AGREEMENT (the "Agreement") is made on" + s1 + ", by and between Sterling & Pope Publishing Corp, DBA, and hereafter referred to as, "The Painting Pro Guys" ('Master Licensor'), 7462 Chinaberry Lane, Frisco, Texas 75033 and " + s2 + " , of Texas, on the basis of the following understandings and agreements:" ;

このトピックへの返信は締め切られました。
解決に役立った回答 try67

If you want to include double-quotes within a string that's delimited by such quotes you have to escape them, like so:

var myString = "This string contains \"double-quotes\".";

返信数 1

try67
Community Expert
try67Community Expert解決!
Community Expert
December 12, 2017

If you want to include double-quotes within a string that's delimited by such quotes you have to escape them, like so:

var myString = "This string contains \"double-quotes\".";

omanbux作成者
Known Participant
December 12, 2017

thanks a lot. now my code working perfectly. thanks again..