我在javascript中编写了一个提供onclick事件的代码..但是不是单击执行,而是需要双击来执行它
<a href="javascript:void(0)" onclick="chatWith("arun")>Arun</a>
function chatWith(chatuser) {
createChatBox(chatuser);
$("#chatbox_"+chatuser+" .chatboxtextarea").focus();
}
function createChatBox(chatboxtitle,minimizeChatBox) {
if ($("#chatbox_"+chatboxtitle).length > 0) {
if ($("#chatbox_"+chatboxtitle).css('display') == 'none') {
$("#chatbox_"+chatboxtitle).css('display','block');
restructureChatBoxes();
}
$("#chatbox_"+chatboxtitle+" .chatboxtextarea").focus();
return;
}