html 结构字符拼接 html
程序员文章站
2022-07-02 14:29:01
...
function showReasonForm(id) { $('.layout').css({'width':'600px','height':'400px'}); $('.layout_content').css({'width':'580px','height':'380px','background': 'red'}); var html = '<form name="form" method="post">' + '<textarea id="reason" name="reason" placeholder="请输入理由" style="width:560px; height: 300px; margin: auto; line-height: 25px; font-size: 14px;"></textarea>' + '<input type="button" value="提 交" style="background: #2d98dd; onclick="CancelOrder('+id+')">' + '</form>' + '<br>' + '<div id="progress"></div>'; $('.layout_content').html(html) } function CancelOrder(){ alert("aaaaa") }
原文链接:[url] http://www.gonghaibo.cn/life/2018-01-08/173.html[/url]