"iaminsik" <iaminsik (AT) gmail (DOT) com> wrote
Quote:
Hi, I made a function prototype :
head
|
<script type="text/javascript">
function test (value) { alert (value); }
</script>
</head>
Quote:
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>
Quote:
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( '"abc' )" />
<input style="cursor: hand;" type="button" value="test"
onmousedown="test( "'abc" )" />
And I wouldn't use the mousedown event on a button to do anything. The
click event would be more appropriate.