javascript - getting value of anchor by clicking on anchor tag -


By clicking anchor tag in JavaScript, getting the value of anchor tag and I want to pass the value to the controller & lt; div class = form-actions & gt; & lt;% @ sitename.each do | REC | & Gt%; & Lt; An id = "& lt;% = rec.site%>" Data-rel = "tooltip" value = & lt;% = rec.site% & gt; "Title =" Total access in Bangalore "Square =" fine span2 top-block sri "href =" # "& gt; & lt; duration class =" icon32 icon-green icon-users ">

& lt; div & gt; & lt;% = rec.site%> & lt; / div & gt; & lt; div id = "loading-indicator" style = "display: none; "gt; & lt;% = image_tag (" Peregrin-loader .gif ")%>
<% = rec.cnt %>
Today gt;% end%> & lt; / l & gt; & lt; / div & gt; & lt;! - Summary counter - END - & gt; & lt; / div & gt; & lt; script type = text \ JavaScript-> $ ('sri') live ('click', function () { var x = $ (this) .val (); alert x; & lt; / script & gt;

The javascript code is not working, my question is that on the related button How to get anchor value while clicking (Click here button Meaning View Code Output: We get a separate class box If clicked on that box I need that value in a variable and I want to pass the controller) For example, the first button If I click on the Blur button I want that button value and if I click on the Poon button then I want the pin button value in a variable.

Post Tex "Itemprop =" text ">

You can send values ​​through the query string in anchor tag URL. But they can be viewed by others

or you can send via Javascript onclick event

pass the URL and parameters to the Javascript method and through this method Send.

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -