Solved

How can I get asp.net element via javascript??

Posted on 2006-07-02
2
228 Views
Last Modified: 2010-04-17
<http>
      <head>
            <script language="javascript">
                  function GetString()
                  {
                        var add = document.getElementById("byStr");
                                add += "World";
                  }
            </script>
      </head>
      <body>
            <input type="text" id="btStr" value="Hello"/>
            <input type="button" id="btOK" value="OK" onclick="GetString()"/>

      </body>
</http>


I click the button but nothing happen.
I want the text expose "Hello World" after click the button
0
Comment
Question by:tatamaruri
2 Comments
 
LVL 19

Accepted Solution

by:
Rimvis earned 500 total points
ID: 17029359
You have a typo in your code
var add = document.getElementById("byStr");
should be
 var add = document.getElementById("btStr");

0
 

Author Comment

by:tatamaruri
ID: 17029391
thanks.
IT is stupid mistake
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Purpose To explain how to place a textual stamp on a PDF document.  This is commonly referred to as an annotation, or possibly a watermark, but a watermark is generally different in that it is somewhat translucent.  Watermark’s may be text or graph…
If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now