Click here to Skip to main content
16,019,618 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
JavaScript
function myfun(arg)
{
//My function 
} 

HTML
<input type="button"   önclick="myfun(ARG/OPC/123)" />

when i am clicking on button it wont hit my function
Posted
Updated 13-Sep-14 0:25am
v2
Comments
Thomas Daniels 13-Sep-14 6:23am    
It's unclear what you are trying to do. What is ARG/OPC/123? Is it a division, or is it a string that you want to pass?
Chandrakant Mane 13-Sep-14 6:25am    
Yes it is a string

1 solution

In your comment, you said that you are trying to pass a string. Note that a string needs to be surrounded by quotes:
HTML
<input type="button"   onclick="myfun('ARG/OPC/123')" />
 
Share this answer
 
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900