getting the value from button in IE6/7
Hi again!
Wise people, please help me again :-)
So, i have html code:
- <button name="amount" value="1">a</button>
and i want take a value from it a put it in the text input. I tried in two ways:
- $('[name=amount]').click(function() {
- $('input:text').val($(this).val());
- });
and this:
- $('button[name=amount]').click(function () {
- var text = $(this).attr('value');
- $('input[type=text]').val(text);
- });
and always in Internet Explorer 6 and 7 exept value "1" i got "a". Is there any other way to achive this?!