jquery custom attributes, to resolve the issue by value List of button

sponsored links
JQuery on the front with a standard code, encountered some problems. Collection of data on the traverse, the operation of a single data, add, delete, change, check, need to pass some parameters for background processing.
I used the label in the project custom attribute-value, and then jquery attr can be accessed using, this can reduce the javascript code scripts and data coupling

The following is an example code for reference:
<script type="text/javascript">
$ (Document). Ready (function () (
/ / Ajax delete
$ (". Btn_delete"). Click (function () (
ret = window.confirm ('$ (texts [' dtaq.common.delete.msg']}');
if (ret) (
$. Ajax ((
type: "POST",
url: 'sysCodeRuleitemAction.do? method = delete'
+ '& Id ='+$( this). Attr ("paramId")
+ '& Ruleid ='+$( this). Attr ("paramRuleid"),
success: function (msg) (
$ ('# Childbody'). Html (msg);
)
));
)
));
/ /
));
</ Script>
<fieldset>
<legend>
[***********]
</ Legend>
<table>
<thead>
<tr>
<th width="5%"> Serial Number </ th>
<th width="25%"> *****</ th>
<th width="10%"> *****</ th>
<th width="10%"> *****</ th>
<th width="25%"> *****</ th>
</ Tr>
</ Thead>
<C: forEach items = "$ (sysCodeRuleitems)" varStatus = "index"
var = "sysCodeRuleitem">
<tr>
<td> $ (index.count) </ td>
<td> $ (sysCodeRuleitem.ruletype) </ td>
<td> $ (sysCodeRuleitem.rulecontent) </ td>
<td> $ (sysCodeRuleitem.orderno) </ td>
<td>
<div>
<Input type = "button"
value = "$ (texts ['button.edit'])"
paramId = "$ (sysCodeRuleitem.id)"
paramRuleid = "$ (param.ruleid)" />
<Input type = "button"
value = "$ (texts ['button.delete'])"
paramId = "$ (sysCodeRuleitem.id)"
paramRuleid = "$ (param.ruleid)" />
</ Div>
</ Td>
</ Tr>
</ C: forEach>
</ Table>
</ Fieldset>
  • del.icio.us
  • StumbleUpon
  • Digg
  • TwitThis
  • Mixx
  • Technorati
  • Facebook
  • NewsVine
  • Reddit
  • Google
  • LinkedIn
  • YahooMyWeb

Related Posts of jquery custom attributes, to resolve the issue by value List of button

  • JavaScript inheritance

    About JavaScript inherited a small example ... <! DOCTYPE HTML PUBLIC "- / / W3C / / DTD HTML 4.01 / / EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <meta http-equiv="Content-Type" conte ...

  • js page Jump implementation of a number of ways

    The first is: <script language="javascript" type="text/javascript"> window.location.href = "login.jsp? backurl =" + window.location.href; </ script> The second: <script language="javascript"> alert

  • Hibernate Inteceptor

    The end of the project stage, the client suddenly put forward a very troublesome but normal demand, the system records all changes must be carried out. Formats such as: 2004.1.1 12:30 Ikuya wind orders Sales Order Date 2004.1.2-> 2004.1.3 The firs ...

  • jboss ejb3 Message Driven Bean

    Super Medium ejb hate. . . . . . . . . . . . . . . . . . . ================================================ To configure a Message Driven Bean in a different application server parameters are not the same. Currently only passed the test jboss. Message Dri

  • Dynamic loading JS script four kinds of methods

    To achieve dynamic loading JS script has four kinds of methods: 1, direct document.write <script language="javascript"> document.write ( "<script src='test.js'> <\ / script>"); </ script> 2, dynamic scri

  • RoR explained

    ROR is Ruby on Rails. Ruby is a well-known has been very good dynamic language It's dynamic language. Simple and easy. Dynamic languages are interpreted, but the performance may make a discount, but not absolute, because the application is complex, th

  • Ruby on Rails Routing - Simple Examples

    This article contains a list of ruby on rails routing examples. If you find you have any questions please leave a comment. Routes are processed from the top of routes.rb down. If a route is matched it will stop processing the routes.rb file and use that r

  • can not be represented as java.sql.Timestamp

    Development of procedures for the use of hibernate when, some time there is no need to fill in the fields, but after the hibernate query time reported "Java.sql.SQLException: Value'0000-00-00 'can not be represented as java.sql.Timestamp ...

  • Struts2 + hibernate + spring problem user log in

    dao layer services layer action jsp <tr> <td align="center"> <b> user name: </ b> </ td> <td> <s: textfield name = "czyNumber" cssClass = "textstyle" theme = "simple" size = &q

blog comments powered by Disqus
Recent
Recent Entries
Tag Cloud
Random Entries