You could use the attribute selector
For example for your element
<input type="button" name="view" value="Click To View Phone, Mobile & Fax Numbers" onclick="viewphone(71241,'divid71241')" style="border: 0px;">
If you just have one element with a unique name:
$("input[name='view']").click(function() {
// function data goes here
console.log( this.value )
});
If you have multiple elements with the same name you can use the each() method
$("input[name='view']").each(function() {
// function data goes here
console.log( this.value )
});
Output
Click To View Phone, Mobile & Fax Numbers
// other input values here
If you have multiple elements with the same name but only want the first ones value you can use the .first()
method:
$("input[name='view']").first(function() {
// function data goes here
console.log( this.value )
});