programming we consider all important topic for knowledge about controls,web Services, JSON, Ajax, database, and interview related Question. In this and sql server tutorial blog we give many examples of jquery as like How Play YouTube Video in Your Website by URL, How to Play YouTube Videos in by using Jquery , Jquery Change div background on mouseover in , JQuery UI Datepicker (Calendar) etc.

Saturday, August 30, 2014

How to use alert and display textbox value by javascript

How to use alert message box and display textbox value by java script:

In this post we test a JavaScript code for validating textbox. We know that JavaScript use for validation on client site. Here we take an alert message box which displays whatever is typed in textbox on web page.

Code of JavaScript:

function MsgBox (textstring)
alert (textstring)

Here textstring is the value of textbox ,we show textbox value in alert message on pege.

Example of JavaScript code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
    <script language="JavaScript">
function MsgBox (textstring) {
alert (textstring) }

    <style type="text/css">
<div align="center">
<br />

    <strong><span class="style1">Check entered text by javascript</span></strong><br />
    <br />
    <input name="text1" type="Text" value="hello">
    <input name="submit" type="Button" value="Show Me" onclick="MsgBox(form.text1.value)">
use alert and display textbox value by javascript
display textbox value by javascript
Other Related post:        

No comments:

Post a Comment