About passing parameters in js, passing parameters in js
<A class = 'btn btn-mini btn-info' title = "details" <span style = "color: # FF0000;"> <span style = "color: # FF0000; "> onclick =" cusBatchDetail ($ {cusBatch. postBatchno}) </span> "> <! -- <I class = 'icon-print'> </I> --> details </a>
<A class = 'btn btn-mini btn-info' title = "details" <span style = "background-color: rgb (255,255,255 ); "> <span style =" color: # FF0000; "> <span style =" color: # FF0000; "> onclick =" cusBatchDetail ('$ {cusBatch. postBatchno} </span> ') </span> "> <! -- <I class = 'icon-print'> </I> --> details </a>
Today, a problem occurred when passing parameters between pages. Pass 002. When the function was obtained, it turned out to be 2. Then it was found that the single quotation marks were missing.
If there are single quotes, it will be a string and passed to the js function. The parameter value remains unchanged. For example, 001, passed or 001
Parameters without single quotes, similar to integer types, transmitted to js functions may change. For example, 001. passing in the past is 1.