/ Published in: JavaScript
Expand |
Embed | Plain Text
var l = String(window.location).split('/') var action = l[l.length-1].split('?')[0]
Comments
Subscribe to comments
You need to login to post a comment.

easy way to know action name in pure javascript. of course, if U using ruby on rails
*correction if exist params in url
var l = String(window.location).split('/') var action = l[l.length-1].split('?')[0]