دنبال کننده ها

۱۳۹۶ دی ۱۳, چهارشنبه

javascript - Putting a div inside an input field

[ad_1]



I am in a confusing situation. I have a div like this



<div class="editable" id=" $company->id " data-attribute="description">
$company->description
</div>


I am actually using jinplace inediting and it requires a div to set up like above. I am looking for a way to use character count on this, which only works on input type elements



I tried setting it up like this



 <div class="editable" id=" $company->id " data-attribute="description">
<input type="text" data-length="500" value=" $company->description "
</div>


It shows the character count for this div, but when submitting does not update.



Any ideas how I can set this up?




[ad_2]

لینک منبع