如何使用javascript调用此代码之类的其他javascript?
............................................... .................................................. .................................................. ..................
http://jsfiddle.net/peap/bjdq3oL3/1/
<script src="http://code.jquery.com/jquery-1.7.2.js"></script>
<form method="post" id="form_content" action="Javascript:void(0);">
<button id="desc" name="desc" value="desc" style="display:none;">desc</button>
<button id="asc" name="asc" value="asc">asc</button>
</form>
<script>
$(document).ready(function(){
$('#form_content button').click(function(){
$('#form_content button').toggle();
var numbers = this.id;
function_two();
});
});
function_two(){
alert('numbers');
}
</script>
答案 0 :(得分:3)
function_two(){
alert('numbers');
}
需要声明为函数
function function_two(){
alert('numbers');
}