473,396 Members | 2,140 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

function argument with quote (single, double) mark.

Hi, I made a function prototype :
<head>
<script type="text/javascript">
function test (value) { alert (value); }
</script>
</head>

Now, I hope to call it with quoted string like this :
<body>
<input style="cursor: hand;" type="button" value="ÀÚ·á¼öÁ¤Ã¢ ¿*±â"
onmousedown="test( ' "abc' )" />
<input style="cursor: hand;" type="button" value="ÀÚ·á¼öÁ¤Ã¢ ¿*±â"
onmousedown="test( ' 'abc' )" />
</body>

But, as you know, a parsing error can occur in HTML.

In short, How can I transfer a string which has a quote (single or
double) character?

Jul 19 '07 #1
1 1719

"iaminsik" <ia******@gmail.comwrote in message
news:11**********************@i13g2000prf.googlegr oups.com...
>Hi, I made a function prototype :
<head>
<script type="text/javascript">
function test (value) { alert (value); }
</script>
</head>
>Now, I hope to call it with quoted string like this :
<body>
<input style="cursor: hand;" type="button" value="ÀÚ·á¼öÁ¤Ã¢ ¿*±â"
onmousedown="test( ' "abc' )" />
<input style="cursor: hand;" type="button" value="ÀÚ·á¼öÁ¤Ã¢ ¿*±â"
onmousedown="test( ' 'abc' )" />
</body>
>But, as you know, a parsing error can occur in HTML.
>In short, How can I transfer a string which has a quote (single or
double) character?

Like this:

<input style="cursor: hand;" type="button" value="test"
onmousedown="test( '&quot;abc' )" />
<input style="cursor: hand;" type="button" value="test"
onmousedown="test( &quot;'abc&quot; )" />

And I wouldn't use the mousedown event on a button to do anything. The
click event would be more appropriate.

Jul 19 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: David Furey | last post by:
Hi I have an XML documnet and a XSLT document as shown below THe XSLT document brings back a filtered docmument that has the VendorName that starts with a particular sub-string This works as...
7
by: Chris | last post by:
<< Translation in english of my main post >> Hi, I do not success to pass by parameter the contents of "param". in the function "Main" if I replace Suite('+param+') by Suite('+40+') dans la...
18
by: James Radke | last post by:
Hello, We are currently using a user DLL that when working in VB 6.0 has a user defined type as a parameter. Now we are trying to use the same DLL from a vb.net application and are having...
17
by: Jef Driesen | last post by:
Suppose I have a datastructure (actually it's a graph) with one template parameter (the property P for each edge and vertex): struct graph<P>; struct vertex<P>; struct edge<P>; I also have...
18
by: tbringley | last post by:
I am a c++ newbie, so please excuse the ignorance of this question. I am interested in a way of having a class call a general member function of another class. Specifically, I am trying to...
5
by: StephQ | last post by:
This is from a thread that I posted on another forum some days ago. I didn't get any response, so I'm proposing it in this ng in hope of better luck :) The standard explanation is that pointer...
7
by: bowlderster | last post by:
Hello,all. I want to get the array size in a function, and the array is an argument of the function. I try the following code. /*************************************** */ #include<stdio.h>...
4
by: kovariadam | last post by:
Hi, Does anybody know why i get this error: SQL0176N The second, third or fourth argument of the TRANSLATE scalar function is incorrect. SQLSTATE=42815 with this query: SELECT...
8
by: vaib | last post by:
hi all , It really seems that C never ceases to amaze . All this time i've been doing C and i thought i was quite adept at it but i was wrong . So without wasting any more time , here's the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.