remove attribute HREF after access the LINK

I want to achieve such e effect...

<div id="content"><a href="#MyForm">some text</a></div>

after Clicking/Accessing the Link once to have "some text" as a ordinary text... like

<div id="content"><a>some text</a></div>

So, 1. How to make that LINK first to achieve the result and then TO REMOVE or DISABLE ATTRIBUTE HREFF? Thank you in advance for your support!

Answers


You can rewrite the html element, try this one:

<div id="content"><a href="#MyForm" onClick="document.getElementById('content').innerHTML='some text';">some text</a></div>

edit: oops on first post, here some explaination.

By adding the onClick action to remove the element:

<a href="#MyForm" onClick="document.getElementById('content').innerHTML='some text';">some text</a>

and replace it with

some text

So after you click the link, you html dom will be modified and look like:

<div id="content">some text</div>

Need Your Help

How can I convert an Class Object into String?

c# .net wcf reflection

I have a class object that comes through a web service (WCF). The class has properties of type String and some custom Class Types.

Is it possible to indirectly load a value type on the stack

cil reflection.emit

In Microsoft IL, to call a method on a value type you need an indirect reference. Lets say we have an ILGenerator named "il" and that currently we have a Nullable on top of the stack, if we want to...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.