I’ve a button and that has an attribute called fromname.
<input name='booknow' type='button' onClick='bookNow(this);' value='Book Now' id='saloon' fromname='london heathrow airport' toname="london luton airport"/>
but when I try to access the attribute fromname that will give me only “london” not “london heathrow airport”
function bookNow(obj)
{
var fromname=$(obj).attr("fromname");
alert(fromname);
}
How can find the whole attribute value?
Use:
Instead of
prop.http://jsfiddle.net/CcG6k/