当用户输入 input 时,我的 textarea 可以计算字符串/字符。这是我的jsfiddle
我的问题是我想设置条件意味着当字符串/字符高于 158 时,我想在里面显示消息<div id="message">We will deduct 2 credit from your account</div>
,当字符串/字符高于 316 时,消息将更新并显示<div id="message">We will deduct 3 credit from your account</div>
并继续..
例子 :
158 *2
158 = We will deduct 2 credit from your account
316 = We will deduct 3 credit from your account
474 = We will deduct 4 credit from your account
632 = We will deduct 5 credit from your account
...