lady64
چهارشنبه 21 تیر 1391, 10:37 صبح
سلام . این دو کد اجرای نمیشن . علتش چیه
<script type="text/javascript">
function Hello_User()
{
var name = prompt ( "enter your name") ;
if ( name != null )
document.write ( "hello dear " + name + " " + "Welcome to DeveloperStudio" ) ;
}
</script>
<input type="button" id="btnHello" onclick="Hello_User()" value="Enter Name" />
پنجره ی prompt باز نمیشه که مقداری وارد کنم
و این :
<script type="text/javascript">
function Change_Page( )
{
var x = confirm ( "Do you want go to home page ? " ) ;
if ( x == true )
document.URL = "index.php" ;
else
document.write ( " You pressed Cancel ! " ) ;
}
</script>
<input type="button" id="btnChange" value=" go to Home Page ? " onclick="Change_Page( )" />
به صفحه ی index.php نمیره . دستور document.url درسته ؟
<script type="text/javascript">
function Hello_User()
{
var name = prompt ( "enter your name") ;
if ( name != null )
document.write ( "hello dear " + name + " " + "Welcome to DeveloperStudio" ) ;
}
</script>
<input type="button" id="btnHello" onclick="Hello_User()" value="Enter Name" />
پنجره ی prompt باز نمیشه که مقداری وارد کنم
و این :
<script type="text/javascript">
function Change_Page( )
{
var x = confirm ( "Do you want go to home page ? " ) ;
if ( x == true )
document.URL = "index.php" ;
else
document.write ( " You pressed Cancel ! " ) ;
}
</script>
<input type="button" id="btnChange" value=" go to Home Page ? " onclick="Change_Page( )" />
به صفحه ی index.php نمیره . دستور document.url درسته ؟