HI I HAVE ONE PROBLEM........ANY ONE CAN SOLVE IT
....................

String s="void main() ' he is a \"good boy";
out.println("<input type=text value='"+s+"' name=s>");

IN THIS CODE , IN TEXT BOX THE VALUE AFTER ' IS NOT COMING , CAN ANYONE TELL HOW THE FULL STRING s CAN COME IN TEXT BOX../.

That looks like JSP to me. Certainly not Javascript.

Yip that looks like jsp/java.

I dont understand why you have a method name as a value for a string, it would be much simpler for u to do:

String s="he is a good boy";
out.println("<input type=text value='"+ s + "' name=s>");

if you wanted the words good boy to appear in double quotes just escape the double quotes like this:

String s = "he is a \"good boy\" "
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.