我試圖給我的函數傳遞一個參數,但它沒有通過。將參數值傳遞給javascript函數
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js">
</script>
<script>
$(document).ready(function() {
function Person() {
alert('New Person Created');
}
Person.prototype.sayHello = function (parm1) {
alert('Hello from = ', parm1);
};
var itsme = new Person();
itsme.sayHello('Prem');
var newfunction = itsme.sayHello;
newfunction.call(itsme);
});
</script>
</head>
<body>
</body>
</html>
jQuery是沒用的她即 – leaf