我试图给文本框赋予风格,但它现在正在工作.这是我到目前为止所做的.
<div class="modal fade" id="signin_modal">
<div class="modal-dialog">
<div class="modal-content">
<div class=" modal-header">
Create An Account
</div>
<div class="modal-body">
@using(Html.BeginForm())
{
<table class="signin_tbl">
<tr>
<td class="signin_txt"><h5>Email</h5></td>
<td>@Html.TextBox("Name", new { style=" height:70px; "} ) </td>
</tr>
<tr>
<td class="signin_txt">Password</td>
<td class="signin_tb" >@Html.TextBox("password") </td>
</tr>
</table>
}
</div>
Run Code Online (Sandbox Code Playgroud)
这就是我得到的输出:

我有这个页面说test.aspx.Its codebehind就像下面的代码.
protected void Page_Load(object sender, EventArgs e)
{
}
public void display()
{
// some block statements
}
Run Code Online (Sandbox Code Playgroud)
由于函数display()在外面,Page_Load因此从不调用它.那么如何在此之后调用此函数Page_Load.
注意:我需要此功能Page_Load.
我有以下javascript代码.
<script>
var myobj = {
fname : "abc",
lname: "xyz",
getvalue : function(v)
{
alert(typeof this.getvalue);
alert( this.fname + " " + this.lname + " " + this.v );
}
};
myobj.getvalue(3);
</script>
Run Code Online (Sandbox Code Playgroud)
根据我的理解,getvalue在上面的代码中方法不起作用然后如何typeof this.getvalue返回函数.
为什么上述代码中的第二个警告显示undefined何时指向vthis.v?
怎么
throw
{
name: 'type error',
message: 'provide numeric value'
};
Run Code Online (Sandbox Code Playgroud)
语法不正确的时候
throw{
name: 'type error',
message: 'provide numeric value'
};
Run Code Online (Sandbox Code Playgroud)
语法是否正确?
是否真的有必要附加花括号和为什么?
我有这个javascript代码无法正常工作.
function myfun()
{
return
{
alert("para");
}
};
myfun();
Run Code Online (Sandbox Code Playgroud)
我已经阅读了javascript的自动分号插入.我将上面的代码更正为
return{
alert("para");
}
Run Code Online (Sandbox Code Playgroud)
但仍然有错误:unexpected token (.我想知道为什么?
注意:我不需要解决方案,但我需要解释为什么上面的代码不起作用.
编辑
根据书中,javascript的好部分,return语句如果返回值必须与返回表达式在同一行.
即
return {
status: true
};
Run Code Online (Sandbox Code Playgroud)
和
return
{
status: true
};
Run Code Online (Sandbox Code Playgroud)
是错的.然后怎么样
function myfun(para)
{
var status;
return
{
status : alert(para)
};
};
myfun("ok");
Run Code Online (Sandbox Code Playgroud)
产生没有错误.它不会工作,但也没有显示任何错误{.它与返回时在同一行.
即
function myfun(para)
{
var status;
return{
status : alert(para)
};
};
myfun("ok");
Run Code Online (Sandbox Code Playgroud)