Purpose
The attr binding provides a generic way to set the value of any attribute for the associated DOM element. This is useful, for example, when you need to set the title attribute of an element, the src of an img tag, or the href of a link based on values in your view model, with the attribute value being updated automatically whenever the corresponding model property changes.
Example
<a data-bind="attr: { href: url, title: details }">
Report
</a>
<script type="text/java