简体   繁体   中英

Get value from attr view in modal - MVC js

It is possible to post data-element-id value to modal? I tried to get $id but I'm not sure why this working for attr but I can't post $id in method in next (ex postMethod($id). Can someone please explain me how this work. Thank you.

照片1

I found solution js

   function goDoSomething(identifier) {

   alert("data-id:" + $(identifier).data('element-id'));
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM