Solved

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

Posted on 2006-07-02
2
231 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

A short article about problems I had with the new location API and permissions in Marshmallow
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 fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

808 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