Show Textbox on Hyperlink

function toggle() {
var ele = document.getElementById("qtyFm");
var text = document.getElementById("displayQty");
if(ele.style.display == "block") {
ele.style.display = "none";
text.innerHTML = "Show Textbox";
}
else {
ele.style.display = "block";
text.innerHTML = "Hide Textbox";
}
}


<a id='displayQty' href='javascript:toggle();'>Show Textbox</a>


Output



Advertisements
Categories: General | Leave a comment

Post navigation

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: