我在react js中有一个简单的表单构建。它有一个带有提交按钮的文本区域。现在,我想以这种形式添加OnBlur功能。我在render方法中尝试过:
SELECT
CONVERT(varchar, GETDATE(), 103) AS Date, 'Sales Orders' AS Type, COUNT(SalesOrderID) AS Qty, '$' + CONVERT(VARCHAR(20), ISNULL(ROUND(SUM(SubTotal), 2),0)) AS [Total Ex GST]
FROM dbo.SalesOrder
WHERE (DateCreated > CONVERT(int, GETDATE() - 0.5))
但这不起作用。原始代码(来自FaceBook教程)如下:请注意,我知道我需要通过以下几行绑定onBlur():render() {
return (
<form onSubmit={this.handleSubmit}> onBlur={this.onBlur}
<label>
Name:
<input type="text" value={this.state.value} onChange={this.handleChange} />
</label>
<input type="submit" value="Submit" />
</form>
);
}
。因此,这不是要关注的领域。
this.onBlur = this.onBlur.bind(this);