第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定

求解prompt(str1,str2);str2中可以寫代碼嗎?為什么例題上沒有寫呢?

<html>
<head>
<meta?http-equiv="content_type"content="text/heml;charset=utf-8"/>
<title>prompt</title>
<script?typr="text/javascript">
var?myname=promrt("請(qǐng)輸入你的名字","小胖")
if(myname==小胖)
{alert("hello"+myname)
else
?{alert("hello?myfriend")
?</script>
?</head>
?<body>
?<input="button"?type="button"?onclick="rec"()"
?value="點(diǎn)擊我交個(gè)朋友啊,"/>
?</body>
?</html>


正在回答

3 回答

是prompt,不是promrt,你寫錯(cuò)了

1 回復(fù) 有任何疑惑可以回復(fù)我~

<!DOCTYPE html>
<html>
<head>
? ?<title> prompt </title>
? ?<meta http-equiv="Content-Type" content="text/html; charset=gbk"/>
? ?<script typr="text/javascript">
? ? ? ?function rec(){
? ? ? ? ? ?var myName = prompt("str1:代表提示用戶輸入的信息(網(wǎng)址或數(shù)字等)","這里是輸入的內(nèi)容,也是返回的值");
? ? ? ? ? ?if(myName!=null){
? ? ? ? ? ? ? ?alert("hello" + myName);
? ? ? ? ? ?}
? ? ? ? ? ?else{
? ? ? ? ? ? ? ?alert("hello myFriend");
? ? ? ? ? ?}
? ? ? ?}
? ?</script>
</head>
<body>
<input type="button" onclick="rec()" value="點(diǎn)擊我交個(gè)朋友啊"/>
<p><mark>我也是新手,你的代碼是錯(cuò)的,我改了,你試下</mark></p>
</body>
</html>

0 回復(fù) 有任何疑惑可以回復(fù)我~

<html>

<head>

<meta http-equiv="content_type"content="text/heml;charset=utf-8"/>

<title>prompt</title>

<script typr="text/javascript">

function rec(){

? ? var myname=prompt("請(qǐng)輸入你的名字","小胖");

? ? if(myname=="小胖")

? ? {

? ? ? ? alert("hello"+myname);

? ? }

? ? else

? ? {

? ? ? ? alert("hello myfriend");

? ? }

? ? ?

?}

?</script>

?</head>

?<body>

?<input name="button" type="button" onclick="rec()"

?value="點(diǎn)擊我交個(gè)朋友啊"/>

?</body>

?</html>

你對(duì)比一下我寫的,你的有好幾處語(yǔ)法錯(cuò)誤,str2中可以寫代碼

0 回復(fù) 有任何疑惑可以回復(fù)我~

舉報(bào)

0/150
提交
取消

求解prompt(str1,str2);str2中可以寫代碼嗎?為什么例題上沒有寫呢?

我要回答 關(guān)注問題
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)