search

Home  >  Q&A  >  body text

About passing strings in js

<script>

function doDel(id) {

alert(id);

if(confirm('Confirm deletion? ')) {

                                                                                             window.location='action.php?action=del&p_id='                                                    

                                                                                                                ;

PHP in

echo "<td>

                                                                                             'p_id']})'>Delete</a>

</td>";

## Problems encountered: I am now A number like $row['p_id']=20151000 can be passed, but once $row['p_id']=qwq121, it will show that qwq121 is undefined. How to solve it?


YOSIN_LYOSIN_L2352 days ago1238

reply all(2)I'll reply

  • 小さな手は

    小さな手は2018-06-24 00:36:32

    Brother dei must have quotation marks $row['p_id']='qwq121';$row['p_id']="qwq121";

    reply
    0
  • YOSIN_L

    Yeah, yeah, I got it done. I typed it wrong at first. It was really embarrassing. I thought I was wrong.

    YOSIN_L · 2018-06-24 00:39:27
  • Cancelreply