javascript code in onkeypress value -


for below text box:

<input type="text" style="" onkeypress="javascript:doit_onkeypress(event);" /> 

this script working fine.

<script type="text/javascript">             function doit_onkeypress(event){                 if (event.keycode == 13 || event.which == 13){                     here action works                 }             }         </script> 

but problem images (instead of text area) creating dynamically.

i trying execute same

   <input type="text" style="" onkeypress="  <script type="text/javascript">                 function doit_onkeypress(event){                     if (event.keycode == 13 || event.which == 13){                         here action works                     }                 }             </script>" /> 

is possible above modifications?

why because dynamically generating images can't write java script on key press actions every image. every image action url different.


Comments

Popular posts from this blog

java - Run spring boot application error: Cannot instantiate interface org.springframework.context.ApplicationListener -

reactjs - React router and this.props.children - how to pass state to this.props.children -

Excel VBA "Microsoft Windows Common Controls 6.0 (SP6)" Location Changes -