0

I am working on a form that does an autosave functionality and am having an issue working with data-* attributes..

Here is an input:

<input class="span2 autosave" data-athlete-id="58" data-event="blur" data-object-name="stat" data-stat-type-id="1" data-url="/stats" id="stat_value" maxlength="4" name="stat[value]" size="4" type="text" value="4.04">

When I serialize this input to pass it to my StatsController, athlete_id is passed in as athleteId... how do I pass in the data-attribute of athlete_id as athlete_id (or any data attr that's longer than one word)?

4

1 回答 1

1

我相信您正在寻找的答案是data-athlete_id

于 2013-07-12T19:33:00.310 回答