1

http://jsfiddle.net/dolours/Yazpj/577/ I can't figure out what is the issue with this js fiddle! why alert not showing up?

<input type='input' name='name' id='name' value="test" class='required' />
<input type="button" value="test" onclick="test()"/>

function test()
{
var testvalues = $('#name').val();   
alert(testvalues);
}
4

1 回答 1

4

您必须在库选项中设置 jQuery,因为您在代码中使用 jQuery。jsfiddle.net/Yazpj/578/

在此处输入图像描述

于 2013-05-04T07:17:33.407 回答